[llvm] r250749 - [Orc] Use '= default' for move constructor/assignment as per dblaikie's review.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 19 15:57:00 PDT 2015


On Mon, Oct 19, 2015 at 3:49 PM, Lang Hames via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: lhames
> Date: Mon Oct 19 17:49:18 2015
> New Revision: 250749
>
> URL: http://llvm.org/viewvc/llvm-project?rev=250749&view=rev
> Log:
> [Orc] Use '= default' for move constructor/assignment as per dblaikie's
> review.
>
> Thanks Dave!
>
> Modified:
>     llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h
>
> Modified:
> llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h?rev=250749&r1=250748&r2=250749&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h
> (original)
> +++ llvm/trunk/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h Mon
> Oct 19 17:49:18 2015
> @@ -69,21 +69,12 @@ private:
>
>      LogicalModuleResources() {}
>
> -    LogicalModuleResources(LogicalModuleResources &&Other) {
> -      SourceModule = std::move(Other.SourceModule);
> -      StubsToClone = std::move(StubsToClone);
> -      StubsMgr = std::move(StubsMgr);
> -    }
> -
>      // Explicit move constructor to make MSVC happy.
> -    LogicalModuleResources& operator=(LogicalModuleResources &&Other) {
> -      SourceModule = std::move(Other.SourceModule);
> -      StubsToClone = std::move(StubsToClone);
> -      StubsMgr = std::move(StubsMgr);
> -      return *this;
> -    }
> +    LogicalModuleResources(LogicalModuleResources &&Other) = default;
>

Ack, sorry - I just meant = default on the default (no args) ctor. I don't
think = default works on the move ops in MSVC... :/


>
>      // Explicit move assignment to make MSVC happy.
> +    LogicalModuleResources& operator=(LogicalModuleResources &&Other) =
> default;
> +
>      JITSymbol findSymbol(StringRef Name, bool ExportedSymbolsOnly) {
>        if (Name.endswith("$stub_ptr") && !ExportedSymbolsOnly) {
>          assert(!ExportedSymbolsOnly && "Stubs are never exported");
>
>
> _______________________________________________
> 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/20151019/495478ca/attachment.html>


More information about the llvm-commits mailing list