mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214264 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0630cb25a1
commit
f8b862d87c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user