From: NAKAMURA Takumi Date: Tue, 29 Jul 2014 12:20:50 +0000 (+0000) Subject: UseListShuffleVector: Add a copy constructor to appease msc17. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b7e87b07bb5db75f848e3304e6b4f25e718ad49f;p=oota-llvm.git UseListShuffleVector: Add a copy constructor to appease msc17. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214178 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/IR/UseListOrder.h b/include/llvm/IR/UseListOrder.h index 128793bf6b3..c56d1cac617 100644 --- a/include/llvm/IR/UseListOrder.h +++ b/include/llvm/IR/UseListOrder.h @@ -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];