From: NAKAMURA Takumi Date: Sun, 24 Jun 2012 03:48:53 +0000 (+0000) Subject: llvm/Support/IntegersSubset.h: Add a copy constructor on IntegersSubset to appease... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=653bbb494bd4c9737c6efa76b6176f6ede89a391;p=oota-llvm.git 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 --- 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;