Skip to content

Commit 4f6ccb2

Browse files
authored
[SYCL][Driver] Remove temporary string usage in HandleXarchArgs (#13248)
We should use string which is valid during the whole compilation phase instead of a temporary string. Signed-off-by: jinge90 <[email protected]>
1 parent 7045309 commit 4f6ccb2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Driver/Compilation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ static void HandleXarchArgs(DerivedArgList *OffloadArgList, const Driver &D,
9999
OffloadArgList->MakeArgStringRef(XarchVecs[Index]));
100100
}
101101
} else
102-
XarchValueRefs.push_back(StringRef(XarchV));
102+
XarchValueRefs.push_back(OffloadArgList->MakeArgString(XarchV));
103103
}
104104

105105
if (NeedHandle) {

0 commit comments

Comments
 (0)