Skip to content

Commit

Permalink
[SYCL][Driver] Remove temporary string usage in HandleXarchArgs (#13248)
Browse files Browse the repository at this point in the history
We should use string which is valid during the whole compilation phase
instead of a temporary string.

Signed-off-by: jinge90 <ge.jin@intel.com>
  • Loading branch information
jinge90 authored Apr 5, 2024
1 parent 7045309 commit 4f6ccb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang/lib/Driver/Compilation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ static void HandleXarchArgs(DerivedArgList *OffloadArgList, const Driver &D,
OffloadArgList->MakeArgStringRef(XarchVecs[Index]));
}
} else
XarchValueRefs.push_back(StringRef(XarchV));
XarchValueRefs.push_back(OffloadArgList->MakeArgString(XarchV));
}

if (NeedHandle) {
Expand Down

0 comments on commit 4f6ccb2

Please sign in to comment.