From: David Blaikie Date: Fri, 31 Jul 2015 21:26:16 +0000 (+0000) Subject: -Wdeprecated-clean: Fix cases of violating the rule of 5 in ways that are deprecated... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b4b38d65e68a3aaac2a3101067f067313bf13b4b;p=oota-llvm.git -Wdeprecated-clean: Fix cases of violating the rule of 5 in ways that are deprecated in C++11 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243786 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/ExecutionEngine/Orc/LogicalDylib.h b/include/llvm/ExecutionEngine/Orc/LogicalDylib.h index 28700ef347d..be9cdfa7193 100644 --- a/include/llvm/ExecutionEngine/Orc/LogicalDylib.h +++ b/include/llvm/ExecutionEngine/Orc/LogicalDylib.h @@ -28,6 +28,10 @@ private: typedef std::vector BaseLayerHandleList; struct LogicalModule { + // Make this move-only to ensure they don't get duplicated across moves of + // LogicalDylib or anything like that. + LogicalModule(LogicalModule&&) = default; + LogicalModule() = default; LogicalModuleResources Resources; BaseLayerHandleList BaseLayerHandles; }; @@ -46,6 +50,10 @@ public: BaseLayer.removeModuleSet(BLH); } + // If possible, remove this and ~LogicalDylib once the work in the dtor is + // moved to members (eg: self-unregistering base layer handles). + LogicalDylib(LogicalDylib&& RHS) = default; + LogicalModuleHandle createLogicalModule() { LogicalModules.push_back(LogicalModule()); return std::prev(LogicalModules.end());