[llvm-commits] [llvm] r159101 - /llvm/trunk/include/llvm/Support/IntegersSubset.h
NAKAMURA Takumi
geek4civic at gmail.com
Sat Jun 23 20:48:54 PDT 2012
Author: chapuni
Date: Sat Jun 23 22:48:53 2012
New Revision: 159101
URL: http://llvm.org/viewvc/llvm-project?rev=159101&view=rev
Log:
llvm/Support/IntegersSubset.h: Add a copy constructor on IntegersSubset to appease msvc.
msvc mis-infers ParentTy(RHS) to (const RangesCollectionTy &).
Modified:
llvm/trunk/include/llvm/Support/IntegersSubset.h
Modified: llvm/trunk/include/llvm/Support/IntegersSubset.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/IntegersSubset.h?rev=159101&r1=159100&r2=159101&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/IntegersSubset.h (original)
+++ llvm/trunk/include/llvm/Support/IntegersSubset.h Sat Jun 23 22:48:53 2012
@@ -500,6 +500,10 @@
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;
More information about the llvm-commits
mailing list