Skip to content

Commit 8f0a8ed

Browse files
committed
[InjectTLIMappings] Use StringRef instead of std::string for FN name.
https://reviews.llvm.org/D83797
1 parent a59d4ae commit 8f0a8ed

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Transforms/Utils/InjectTLIMappings.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ static void addMappingsFromTLI(const TargetLibraryInfo &TLI, CallInst &CI) {
7777
if (CI.isNoBuiltin() || !CI.getCalledFunction())
7878
return;
7979

80-
const std::string ScalarName = std::string(CI.getCalledFunction()->getName());
80+
StringRef ScalarName = CI.getCalledFunction()->getName();
81+
8182
// Nothing to be done if the TLI thinks the function is not
8283
// vectorizable.
8384
if (!TLI.isFunctionVectorizable(ScalarName))

0 commit comments

Comments
 (0)