[llvm] r271958 - Attempt to work around lack of std::map::emplace in libstdc++4.7
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 6 16:28:03 PDT 2016
Author: rnk
Date: Mon Jun 6 18:28:03 2016
New Revision: 271958
URL: http://llvm.org/viewvc/llvm-project?rev=271958&view=rev
Log:
Attempt to work around lack of std::map::emplace in libstdc++4.7
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=271958&r1=271957&r2=271958&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/Symbolize/Symbolize.cpp (original)
+++ llvm/trunk/lib/DebugInfo/Symbolize/Symbolize.cpp Mon Jun 6 18:28:03 2016
@@ -325,7 +325,8 @@ LLVMSymbolizer::getOrCreateObject(const
if (I == BinaryForPath.end()) {
Expected<OwningBinary<Binary>> BinOrErr = createBinary(Path);
if (!BinOrErr) {
- BinaryForPath.emplace(Path, OwningBinary<Binary>());
+ OwningBinary<Binary> NullBinary;
+ BinaryForPath.insert(std::make_pair(Path, std::move(NullBinary)));
return BinOrErr.takeError();
}
Bin = BinOrErr->getBinary();
More information about the llvm-commits
mailing list