[llvm] r214264 - Revert "UseListOrder: Remove move assignment"
Duncan P. N. Exon Smith
dexonsmith at apple.com
Tue Jul 29 17:25:33 PDT 2014
Author: dexonsmith
Date: Tue Jul 29 19:25:33 2014
New Revision: 214264
URL: http://llvm.org/viewvc/llvm-project?rev=214264&view=rev
Log:
Revert "UseListOrder: Remove move assignment"
This reverts commit r214260. Turns out move assignment *is* necessary
for MSVC [1].
[1]: http://bb.pgr.jp/builders/ninja-clang-i686-msc17-R/builds/9631
Modified:
llvm/trunk/include/llvm/IR/UseListOrder.h
Modified: llvm/trunk/include/llvm/IR/UseListOrder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/UseListOrder.h?rev=214264&r1=214263&r2=214264&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/UseListOrder.h (original)
+++ llvm/trunk/include/llvm/IR/UseListOrder.h Tue Jul 29 19:25:33 2014
@@ -54,12 +54,15 @@ class UseListShuffleVector {
UseListShuffleVector(const UseListShuffleVector &X) LLVM_DELETED_FUNCTION;
UseListShuffleVector &
operator=(const UseListShuffleVector &X) LLVM_DELETED_FUNCTION;
- UseListShuffleVector &
- operator=(UseListShuffleVector &&X) LLVM_DELETED_FUNCTION;
public:
UseListShuffleVector() : Size(0) {}
UseListShuffleVector(UseListShuffleVector &&X) { moveUnchecked(X); }
+ UseListShuffleVector &operator=(UseListShuffleVector &&X) {
+ destroy();
+ moveUnchecked(X);
+ return *this;
+ }
explicit UseListShuffleVector(size_t Size) : Size(Size) {
if (!isSmall())
Storage.Ptr = new unsigned[Size];
@@ -90,11 +93,16 @@ struct UseListOrder {
UseListOrder() : V(0), F(0) {}
UseListOrder(UseListOrder &&X)
: V(X.V), F(X.F), Shuffle(std::move(X.Shuffle)) {}
+ UseListOrder &operator=(UseListOrder &&X) {
+ V = X.V;
+ F = X.F;
+ Shuffle = std::move(X.Shuffle);
+ return *this;
+ }
private:
UseListOrder(const UseListOrder &X) LLVM_DELETED_FUNCTION;
UseListOrder &operator=(const UseListOrder &X) LLVM_DELETED_FUNCTION;
- UseListOrder &operator=(UseListOrder &&X) LLVM_DELETED_FUNCTION;
};
typedef std::vector<UseListOrder> UseListOrderStack;
More information about the llvm-commits
mailing list