[llvm] r251347 - Fix build failure on GCC 4.7 (old libstdc++ doesn't have std::map::emplace).
Alexey Samsonov via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 26 14:20:37 PDT 2015
Author: samsonov
Date: Mon Oct 26 16:20:37 2015
New Revision: 251347
URL: http://llvm.org/viewvc/llvm-project?rev=251347&view=rev
Log:
Fix build failure on GCC 4.7 (old libstdc++ doesn't have std::map::emplace).
Modified:
llvm/trunk/lib/DebugInfo/Symbolize/Symbolize.cpp
Modified: llvm/trunk/lib/DebugInfo/Symbolize/Symbolize.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/Symbolize/Symbolize.cpp?rev=251347&r1=251346&r2=251347&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/Symbolize/Symbolize.cpp (original)
+++ llvm/trunk/lib/DebugInfo/Symbolize/Symbolize.cpp Mon Oct 26 16:20:37 2015
@@ -530,7 +530,8 @@ LLVMSymbolizer::getOrCreateModuleInfo(co
if (!Objects.first) {
// Failed to find valid object file.
- Modules.insert(make_pair(ModuleName, nullptr));
+ Modules.insert(
+ std::make_pair(ModuleName, std::unique_ptr<ModuleInfo>(nullptr)));
return nullptr;
}
std::unique_ptr<DIContext> Context;
@@ -549,7 +550,7 @@ LLVMSymbolizer::getOrCreateModuleInfo(co
assert(Context);
auto Info = llvm::make_unique<ModuleInfo>(Objects.first, std::move(Context));
ModuleInfo *Res = Info.get();
- Modules.emplace(ModuleName, std::move(Info));
+ Modules.insert(std::make_pair(ModuleName, std::move(Info)));
return Res;
}
More information about the llvm-commits
mailing list