[InjectTLIMappings] Use StringRef instead of std::string for FN name.

https://reviews.llvm.org/D83797
This commit is contained in:
Nadav Rotem 2020-07-14 13:35:06 -07:00
parent a59d4ae431
commit 8f0a8ed44e
1 changed files with 2 additions and 1 deletions

View File

@ -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))