diff options
Diffstat (limited to 'llvm/lib/LTO/LTOModule.cpp')
-rw-r--r-- | llvm/lib/LTO/LTOModule.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/LTO/LTOModule.cpp b/llvm/lib/LTO/LTOModule.cpp index 1119622578df..155790041a75 100644 --- a/llvm/lib/LTO/LTOModule.cpp +++ b/llvm/lib/LTO/LTOModule.cpp @@ -545,7 +545,8 @@ void LTOModule::addPotentialUndefinedSymbol(ModuleSymbolTable::Symbol Sym, name.c_str(); } - auto IterBool = _undefines.insert(std::make_pair(name, NameAndAttributes())); + auto IterBool = + _undefines.insert(std::make_pair(name.str(), NameAndAttributes())); // we already have the symbol if (!IterBool.second) @@ -582,7 +583,7 @@ void LTOModule::parseSymbols() { SymTab.printSymbolName(OS, Sym); Buffer.c_str(); } - StringRef Name(Buffer); + StringRef Name = Buffer; if (IsUndefined) addAsmGlobalSymbolUndef(Name); |