[PATCH] D37914: [OpenMP] Don't throw cudalib not found error if only front-end is required.

Gheorghe-Teodor Bercea via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 15 11:58:34 PDT 2017


gtbercea updated this revision to Diff 115447.
gtbercea added a comment.

Fix parantheses.


https://reviews.llvm.org/D37914

Files:
  lib/Driver/ToolChains/Cuda.cpp


Index: lib/Driver/ToolChains/Cuda.cpp
===================================================================
--- lib/Driver/ToolChains/Cuda.cpp
+++ lib/Driver/ToolChains/Cuda.cpp
@@ -502,10 +502,8 @@
   std::string LibDeviceFile = CudaInstallation.getLibDeviceFile(GpuArch);
 
   if (LibDeviceFile.empty()) {
-    if ((DeviceOffloadingKind == Action::OFK_OpenMP &&
-         DriverArgs.hasArg(options::OPT_S)) ||
-        (DeviceOffloadingKind == Action::OFK_OpenMP &&
-         DriverArgs.hasArg(options::OPT_c)))
+    if (DeviceOffloadingKind == Action::OFK_OpenMP &&
+        DriverArgs.hasArg(options::OPT_S, options::OPT_c))
       return;
 
     getDriver().Diag(diag::err_drv_no_cuda_libdevice) << GpuArch;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37914.115447.patch
Type: text/x-patch
Size: 711 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170915/f80501d5/attachment.bin>


More information about the cfe-commits mailing list