-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
This commit is contained in:
David Blaikie 2015-07-31 21:26:16 +00:00
parent caf175c28c
commit b4b38d65e6
1 changed files with 8 additions and 0 deletions

View File

@ -28,6 +28,10 @@ private:
typedef std::vector<BaseLayerModuleSetHandleT> 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());