[llvm] r214178 - UseListShuffleVector: Add a copy constructor to appease msc17.
NAKAMURA Takumi
geek4civic at gmail.com
Tue Jul 29 05:20:50 PDT 2014
Author: chapuni
Date: Tue Jul 29 07:20:50 2014
New Revision: 214178
URL: http://llvm.org/viewvc/llvm-project?rev=214178&view=rev
Log:
UseListShuffleVector: Add a copy constructor to appease msc17.
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=214178&r1=214177&r2=214178&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/UseListOrder.h (original)
+++ llvm/trunk/include/llvm/IR/UseListOrder.h Tue Jul 29 07:20:50 2014
@@ -48,6 +48,13 @@ public:
std::memcpy(this, &X, sizeof(UseListShuffleVector));
X.Size = 0;
}
+ UseListShuffleVector(const UseListShuffleVector &X) {
+ std::memcpy(this, &X, sizeof(UseListShuffleVector));
+ if (!isSmall()) {
+ Storage.Ptr = new unsigned[Size];
+ std::memcpy(Storage.Ptr, X.Storage.Ptr, Size * sizeof(*Storage.Ptr));
+ }
+ }
explicit UseListShuffleVector(size_t Size) : Size(Size) {
if (!isSmall())
Storage.Ptr = new unsigned[Size];
More information about the llvm-commits
mailing list