[ModuleSummary] use StringRefs to avoid a redundant copy; NFC

`Saver` is a StringSaver, which has a few overloads of `save` that all
ultimately just call `StringRef save(StringRef)`. Just take a StringRef
here instead of building up a std::string to convert it to a StringRef.

llvm-svn: 348650
This commit is contained in:
George Burgess IV committed 2018-12-07 21:47:32 +00:00
1 parent 44dfd81d01
commit a0082afcb6
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -4918,7 +4918,7 @@ void ModuleSummaryIndexBitcodeReader::setValueGUID(
ValueIdToValueInfoMap[ValueID] = std::make_pair(
TheIndex.getOrInsertValueInfo(
ValueGUID,
UseStrtab ? ValueName : TheIndex.saveString(ValueName.str())),
UseStrtab ? ValueName : TheIndex.saveString(ValueName)),
OriginalNameID);
}