From 18e74f550761536b9f7a6f2a4b30d7afb0445633 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Tue, 29 Jul 2014 12:20:50 +0000 Subject: [PATCH] UseListShuffleVector: Add a copy constructor to appease msc17. llvm-svn: 214178 --- llvm/include/llvm/IR/UseListOrder.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/llvm/include/llvm/IR/UseListOrder.h b/llvm/include/llvm/IR/UseListOrder.h index 128793bf6b37..c56d1cac617b 100644 --- a/llvm/include/llvm/IR/UseListOrder.h +++ b/llvm/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];