Skip to content

Commit a79ed5d

Browse files
committed
remove redundant string create
Signed-off-by: jinge90 <[email protected]>
1 parent 8d49f7e commit a79ed5d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

clang/lib/Driver/ToolChains/SYCL.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -434,9 +434,7 @@ addSYCLDeviceSanitizerLibs(const Compilation &C, bool IsSpirvAOT,
434434
const llvm::opt::ArgList &Args = C.getArgs();
435435
enum { JIT = 0, AOT_CPU, AOT_DG2, AOT_PVC };
436436
auto addSingleLibrary = [&](StringRef DeviceLibName) {
437-
SmallString<128> LibName(DeviceLibName);
438-
llvm::sys::path::replace_extension(LibName, LibSuffix);
439-
LibraryList.push_back(Args.MakeArgString(LibName));
437+
LibraryList.push_back(Args.MakeArgString(Twine(DeviceLibName) + LibSuffix));
440438
};
441439

442440
// This function is used to check whether there is only one GPU device

0 commit comments

Comments
 (0)