llvm/Support/IntegersSubset.h: Add a copy constructor on IntegersSubset to appease...
authorNAKAMURA Takumi <geek4civic@gmail.com>
Sun, 24 Jun 2012 03:48:53 +0000 (03:48 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Sun, 24 Jun 2012 03:48:53 +0000 (03:48 +0000)
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

index 376b256bbeb85cde220330e1b4e640c3988a9357..bb9e76925ed55b6f6ae5e6ec6100a2d63bd04a81 100644 (file)
@@ -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<class RangesCollectionTy>
   explicit IntegersSubset(const RangesCollectionTy& Src) : ParentTy(Src) {
     std::vector<Constant*> Elts;