From: Chandler Carruth Date: Mon, 10 Mar 2014 01:32:25 +0000 (+0000) Subject: [PM] As Dave noticed in review, I had erroneously copied the move X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=209ae573e03bfd50b158d52d456539e8e876f047;p=oota-llvm.git [PM] As Dave noticed in review, I had erroneously copied the move constructors from the classes which only have a single reference member to many other places. This resulted in them copying their single member instead of moving. =/ Fix this. There's really not a useful test to add sadly because these move constructors are only called when something deep inside some standard library implementation *needs* to move them. Many of the types aren't even user-impacting types. Or, the objects are copyable anyways and so the result was merely a performance problem rather than a correctness problem. Anyways, thanks for the review. And this is a great example of why I wish I colud have the compiler write these for me. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203431 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/IR/PassManager.h b/include/llvm/IR/PassManager.h index e16524577f9..74a6d99a4a4 100644 --- a/include/llvm/IR/PassManager.h +++ b/include/llvm/IR/PassManager.h @@ -70,7 +70,7 @@ public: PreservedAnalyses(const PreservedAnalyses &Arg) : PreservedPassIDs(Arg.PreservedPassIDs) {} PreservedAnalyses(PreservedAnalyses &&Arg) - : PreservedPassIDs(Arg.PreservedPassIDs) {} + : PreservedPassIDs(std::move(Arg.PreservedPassIDs)) {} PreservedAnalyses &operator=(PreservedAnalyses RHS) { std::swap(*this, RHS); return *this; @@ -207,7 +207,7 @@ struct PassModel