[llvm] r329944 - [ORC] Use insert rather than emplace.
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 16 15:55:54 PDT 2018
On Thu, Apr 12, 2018 at 12:57 PM Lang Hames via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> 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
>
^ strangely asymmetric (braces on the if, no braces on the else - both one
liners)?
> + 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)));
> }
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180416/ad6bb015/attachment.html>
More information about the llvm-commits
mailing list