1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

Attempt to work around lack of std::map::emplace in libstdc++4.7

llvm-svn: 271958
This commit is contained in:
Reid Kleckner 2016-06-06 23:28:03 +00:00
parent 792f4e6cf0
commit 236d68ce0f

View File

@ -325,7 +325,8 @@ LLVMSymbolizer::getOrCreateObject(const std::string &Path,
if (I == BinaryForPath.end()) { if (I == BinaryForPath.end()) {
Expected<OwningBinary<Binary>> BinOrErr = createBinary(Path); Expected<OwningBinary<Binary>> BinOrErr = createBinary(Path);
if (!BinOrErr) { if (!BinOrErr) {
BinaryForPath.emplace(Path, OwningBinary<Binary>()); OwningBinary<Binary> NullBinary;
BinaryForPath.insert(std::make_pair(Path, std::move(NullBinary)));
return BinOrErr.takeError(); return BinOrErr.takeError();
} }
Bin = BinOrErr->getBinary(); Bin = BinOrErr->getBinary();