From 653bbb494bd4c9737c6efa76b6176f6ede89a391 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Sun, 24 Jun 2012 03:48:53 +0000 Subject: [PATCH] llvm/Support/IntegersSubset.h: Add a copy constructor on IntegersSubset to appease msvc. msvc mis-infers ParentTy(RHS) to (const RangesCollectionTy &). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159101 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/IntegersSubset.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/llvm/Support/IntegersSubset.h b/include/llvm/Support/IntegersSubset.h index 376b256bbeb..bb9e76925ed 100644 --- a/include/llvm/Support/IntegersSubset.h +++ b/include/llvm/Support/IntegersSubset.h @@ -500,6 +500,10 @@ public: explicit IntegersSubset(Constant *C) : ParentTy(rangesFromConstant(C)), Holder(C) {} + IntegersSubset(const IntegersSubset& RHS) : + ParentTy(*(const ParentTy *)&RHS), // FIXME: tweak for msvc. + Holder(RHS.Holder) {} + template explicit IntegersSubset(const RangesCollectionTy& Src) : ParentTy(Src) { std::vector Elts; -- 2.34.1