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;