Skip to content

Commit

Permalink
[InjectTLIMappings] Use StringRef instead of std::string for FN name.
Browse files Browse the repository at this point in the history
  • Loading branch information
nadavrot committed Jul 16, 2020
1 parent a59d4ae commit 8f0a8ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion llvm/lib/Transforms/Utils/InjectTLIMappings.cpp
Expand Up @@ -77,7 +77,8 @@ static void addMappingsFromTLI(const TargetLibraryInfo &TLI, CallInst &CI) {
if (CI.isNoBuiltin() || !CI.getCalledFunction())
return;

const std::string ScalarName = std::string(CI.getCalledFunction()->getName());
StringRef ScalarName = CI.getCalledFunction()->getName();

// Nothing to be done if the TLI thinks the function is not
// vectorizable.
if (!TLI.isFunctionVectorizable(ScalarName))
Expand Down

0 comments on commit 8f0a8ed

Please sign in to comment.