yaxunl added inline comments.

================
Comment at: clang/lib/Driver/Driver.cpp:3335-3337
+        bool IsRDCMode = Args.hasFlag(options::OPT_fgpu_rdc,
+                                      options::OPT_fno_gpu_rdc, false);
+        bool DeviceOnly = C.getDriver().offloadDeviceOnly();
----------------
There are data members Relocatable and CompileDeviceOnly in the base class. You 
can use them instead of using local variables.



================
Comment at: clang/lib/Driver/Driver.cpp:3342
+            !IsRDCMode && DeviceOnly;
+      }
+
----------------
need to emit a diag diag::err_opt_not_valid_with_opt for fgpu-rdc
and diag::err_opt_not_valid_without_opt if it is not device only.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153667/new/

https://reviews.llvm.org/D153667

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to