[llvm] r214224 - UseListOrder: Try to resolve buildbot failure
Duncan P. N. Exon Smith
dexonsmith at apple.com
Tue Jul 29 14:30:22 PDT 2014
Author: dexonsmith
Date: Tue Jul 29 16:30:21 2014
New Revision: 214224
URL: http://llvm.org/viewvc/llvm-project?rev=214224&view=rev
Log:
UseListOrder: Try to resolve buildbot failure
MSVC [1] thinks `UseListShuffleVector` needs a copy constructor, but I
don't. Let's see if being explicit about `UseListOrder` is convincing.
[1]: http://lab.llvm.org:8011/builders/lld-x86_64-win7/builds/11664/steps/build_Lld/logs/stdio
Here's the failure:
C:/lld-x86_64_win7/lld-x86_64-win7/llvm.src/include\llvm/IR/UseListOrder.h(92): error C2248: 'llvm::UseListShuffleVector::operator =' : cannot access private member declared in class 'llvm::UseListShuffleVector' (C:\lld-x86_64_win7\lld-x86_64-win7\llvm.src\lib\Bitcode\Writer\ValueEnumerator.cpp) [C:\lld-x86_64_win7\lld-x86_64-win7\llvm.obj\lib\Bitcode\Writer\LLVMBitWriter.vcxproj]
C:/lld-x86_64_win7/lld-x86_64-win7/llvm.src/include\llvm/IR/UseListOrder.h(56) : see declaration of 'llvm::UseListShuffleVector::operator ='
C:/lld-x86_64_win7/lld-x86_64-win7/llvm.src/include\llvm/IR/UseListOrder.h(32) : see declaration of 'llvm::UseListShuffleVector'
This diagnostic occurred in the compiler generated function 'llvm::UseListOrder &llvm::UseListOrder::operator =(const llvm::UseListOrder &)'
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=214224&r1=214223&r2=214224&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/UseListOrder.h (original)
+++ llvm/trunk/include/llvm/IR/UseListOrder.h Tue Jul 29 16:30:21 2014
@@ -89,6 +89,20 @@ struct UseListOrder {
UseListOrder(const Value *V, const Function *F, size_t ShuffleSize)
: V(V), F(F), Shuffle(ShuffleSize) {}
+
+ 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;
};
typedef std::vector<UseListOrder> UseListOrderStack;
More information about the llvm-commits
mailing list