[llvm] r231143 - RewriteStatepointsForGC::PhiState: Remove explicit copy ctor in favor of the Rule of Zero

David Blaikie dblaikie at gmail.com
Tue Mar 3 13:49:07 PST 2015


Author: dblaikie
Date: Tue Mar  3 15:49:07 2015
New Revision: 231143

URL: http://llvm.org/viewvc/llvm-project?rev=231143&view=rev
Log:
RewriteStatepointsForGC::PhiState: Remove explicit copy ctor in favor of the Rule of Zero

The assertion was just checking a class invariant that's pretty easy to
verify by inspection (no mutating operations, and the two non-copy ctors
already ensure the state is maintained) so remove the explicit copy ctor
in favor of the default, thus allowing the use of the default copy
assignment operator without hitting the C++11 deprecation here.

Modified:
    llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp?rev=231143&r1=231142&r2=231143&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp Tue Mar  3 15:49:07 2015
@@ -548,9 +548,6 @@ public:
   }
   PhiState(Value *b) : status(Base), base(b) {}
   PhiState() : status(Unknown), base(nullptr) {}
-  PhiState(const PhiState &other) : status(other.status), base(other.base) {
-    assert(status != Base || base);
-  }
 
   Status getStatus() const { return status; }
   Value *getBase() const { return base; }





More information about the llvm-commits mailing list