[llvm] r329944 - [ORC] Use insert rather than emplace.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 12 12:54:41 PDT 2018
Author: lhames
Date: Thu Apr 12 12:54:41 2018
New Revision: 329944
URL: http://llvm.org/viewvc/llvm-project?rev=329944&view=rev
Log:
[ORC] Use insert rather than emplace.
Hopefully this will fix the build failure at
http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/9028
Modified:
llvm/trunk/include/llvm/ExecutionEngine/Orc/Core.h
llvm/trunk/lib/ExecutionEngine/Orc/Core.cpp
Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/Core.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/Core.h?rev=329944&r1=329943&r2=329944&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/Core.h (original)
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/Core.h Thu Apr 12 12:54:41 2018
@@ -352,8 +352,8 @@ private:
SymbolTableEntry(JITSymbolFlags SymbolFlags,
UnmaterializedInfoIterator UnmaterializedInfoItr);
SymbolTableEntry(JITEvaluatedSymbol Sym);
- // SymbolTableEntry(SymbolTableEntry &&Other);
- // SymbolTableEntry &operator=(SymbolTableEntry &&Other);
+ SymbolTableEntry(SymbolTableEntry &&Other);
+ SymbolTableEntry &operator=(SymbolTableEntry &&Other);
~SymbolTableEntry();
// Change definition due to override. Only usable prior to materialization.
Modified: llvm/trunk/lib/ExecutionEngine/Orc/Core.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/Core.cpp?rev=329944&r1=329943&r2=329944&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/Orc/Core.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/Orc/Core.cpp Thu Apr 12 12:54:41 2018
@@ -178,24 +178,24 @@ VSO::SymbolTableEntry::SymbolTableEntry(
"This constructor is for final symbols only");
}
-// VSO::SymbolTableEntry::SymbolTableEntry(SymbolTableEntry &&Other)
-// : Flags(Other.Flags), Address(0) {
-// if (this->Flags.isLazy())
-// UMII = std::move(Other.UMII);
-// else
-// Address = Other.Address;
-// }
-
-// VSO::SymbolTableEntry &VSO::SymbolTableEntry::
-// operator=(SymbolTableEntry &&Other) {
-// destroy();
-// Flags = std::move(Other.Flags);
-// if (Other.Flags.isLazy()) {
-// UMII = std::move(Other.UMII);
-// } else
-// Address = Other.Address;
-// return *this;
-// }
+VSO::SymbolTableEntry::SymbolTableEntry(SymbolTableEntry &&Other)
+ : Flags(Other.Flags), Address(0) {
+ if (this->Flags.isLazy())
+ UMII = std::move(Other.UMII);
+ else
+ Address = Other.Address;
+}
+
+VSO::SymbolTableEntry &VSO::SymbolTableEntry::
+operator=(SymbolTableEntry &&Other) {
+ destroy();
+ Flags = std::move(Other.Flags);
+ if (Other.Flags.isLazy()) {
+ UMII = std::move(Other.UMII);
+ } else
+ Address = Other.Address;
+ return *this;
+}
VSO::SymbolTableEntry::~SymbolTableEntry() { destroy(); }
@@ -364,7 +364,7 @@ Error VSO::defineLazy(std::unique_ptr<Ma
if (I != Symbols.end())
I->second.replaceWith(*this, KV.first, KV.second, UMII);
else
- Symbols.emplace(
+ Symbols.insert(
std::make_pair(KV.first, SymbolTableEntry(KV.second, UMII)));
}
More information about the llvm-commits
mailing list