Fix build failure on GCC 4.7 (old libstdc++ doesn't have std::map::emplace).

llvm-svn: 251347
This commit is contained in:
Alexey Samsonov 2015-10-26 21:20:37 +00:00
parent efbb29153e
commit ff8a80b477
1 changed files with 3 additions and 2 deletions

View File

@ -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<ModuleInfo>(nullptr)));
return nullptr;
}
std::unique_ptr<DIContext> Context;
@ -549,7 +550,7 @@ LLVMSymbolizer::getOrCreateModuleInfo(const std::string &ModuleName) {
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;
}