Fix bug in cling's diagnostic engine, if CUDA mode is enable

- solves the bug, that error messages of the device compiler was
not prefixed with "cling-ptx"
This commit is contained in:
Simeon Ehrig 2021-03-05 17:56:26 +00:00 committed by jenkins
parent 9e2c41e580
commit 6fddcc0e42

View File

@ -1355,7 +1355,9 @@ static void stringifyPreprocSetting(PreprocessorOptions& PPOpts,
// e.g. in CUDA mode
std::string ExeName = "";
if (COpts.CUDAHost)
ExeName = COpts.CUDADevice ? "cling-ptx" : "cling";
ExeName = "cling";
if (COpts.CUDADevice)
ExeName = "cling-ptx";
llvm::IntrusiveRefCntPtr<DiagnosticsEngine> Diags =
SetupDiagnostics(DiagOpts, ExeName);
if (!Diags) {