UseListShuffleVector: Add a copy constructor to appease msc17.

llvm-svn: 214178
This commit is contained in:
NAKAMURA Takumi 2014-07-29 12:20:50 +00:00
parent e2239ff3eb
commit 18e74f5507
1 changed files with 7 additions and 0 deletions

View File

@ -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];