Skip to content

Commit 20471ae

Browse files
authored
[Driver][SYCL][NFC] Fix memory sanitizer issue for AOT (#16063)
When using AOT for GPU, we will setup implied options for PVC targets. The strings that are formed need to be added to the vector to be processed later. One of these strings was a StringRef so the pointed to location can go away. Make a copy of the string to satisfy the sanitizer.
1 parent 337aa79 commit 20471ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/lib/Driver/ToolChains/SYCL.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1889,8 +1889,8 @@ void SYCLToolChain::AddImpliedTargetArgs(const llvm::Triple &Triple,
18891889
DeviceName = DevArg;
18901890
StringRef BackendOptName = SYCL::gen::getGenGRFFlag("auto");
18911891
if (IsGen)
1892-
PerDeviceArgs.push_back(
1893-
{DeviceName, Args.MakeArgString(BackendOptName)});
1892+
PerDeviceArgs.push_back({Args.MakeArgString(DeviceName),
1893+
Args.MakeArgString(BackendOptName)});
18941894
else if (IsJIT)
18951895
BeArgs.push_back(Args.MakeArgString(RegAllocModeOptName + DeviceName +
18961896
":" + BackendOptName));

0 commit comments

Comments
 (0)