diff options
-rw-r--r-- | llvm/include/llvm/IR/ModuleSummaryIndex.h | 2 | ||||
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/include/llvm/IR/ModuleSummaryIndex.h b/llvm/include/llvm/IR/ModuleSummaryIndex.h index 7e10fa1aa02..3b3de5cd16c 100644 --- a/llvm/include/llvm/IR/ModuleSummaryIndex.h +++ b/llvm/include/llvm/IR/ModuleSummaryIndex.h @@ -946,7 +946,7 @@ public: // Save a string in the Index. Use before passing Name to // getOrInsertValueInfo when the string isn't owned elsewhere (e.g. on the // module's Strtab). - StringRef saveString(std::string String) { return Saver.save(String); } + StringRef saveString(StringRef String) { return Saver.save(String); } /// Return a ValueInfo for \p GUID setting value \p Name. ValueInfo getOrInsertValueInfo(GlobalValue::GUID GUID, StringRef Name) { diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index 3dea1b565bc..f9b3c930b05 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -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); } |