From b522682945a257c6544abf111b837144aa7093cb Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Mon, 26 Oct 2015 21:20:37 +0000 Subject: [PATCH] Fix build failure on GCC 4.7 (old libstdc++ doesn't have std::map::emplace). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251347 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/DebugInfo/Symbolize/Symbolize.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/DebugInfo/Symbolize/Symbolize.cpp b/lib/DebugInfo/Symbolize/Symbolize.cpp index aa24dd945d1..ecdb089cd77 100644 --- a/lib/DebugInfo/Symbolize/Symbolize.cpp +++ b/lib/DebugInfo/Symbolize/Symbolize.cpp @@ -530,7 +530,8 @@ LLVMSymbolizer::getOrCreateModuleInfo(const std::string &ModuleName) { if (!Objects.first) { // Failed to find valid object file. - Modules.insert(make_pair(ModuleName, nullptr)); + Modules.insert( + std::make_pair(ModuleName, std::unique_ptr(nullptr))); return nullptr; } std::unique_ptr Context; @@ -549,7 +550,7 @@ LLVMSymbolizer::getOrCreateModuleInfo(const std::string &ModuleName) { assert(Context); auto Info = llvm::make_unique(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; } -- 2.34.1