gtbercea updated this revision to Diff 115444. gtbercea added a comment. Contract check.
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;
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;
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits