From 30815c536baacc07e925f0aef23a5395883173dc Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Thu, 20 Oct 2011 21:10:27 +0000 Subject: Vendor import of llvm release_30 branch r142614: http://llvm.org/svn/llvm-project/llvm/branches/release_30@142614 --- lib/VMCore/Value.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/VMCore/Value.cpp') diff --git a/lib/VMCore/Value.cpp b/lib/VMCore/Value.cpp index f1815e377edc..2fa5f08a3e7f 100644 --- a/lib/VMCore/Value.cpp +++ b/lib/VMCore/Value.cpp @@ -35,12 +35,12 @@ using namespace llvm; // Value Class //===----------------------------------------------------------------------===// -static inline Type *checkType(const Type *Ty) { +static inline Type *checkType(Type *Ty) { assert(Ty && "Value defined with a null type: Error!"); return const_cast(Ty); } -Value::Value(const Type *ty, unsigned scid) +Value::Value(Type *ty, unsigned scid) : SubclassID(scid), HasValueHandle(0), SubclassOptionalData(0), SubclassData(0), VTy((Type*)checkType(ty)), UseList(0), Name(0) { @@ -369,7 +369,7 @@ bool Value::isDereferenceablePointer() const { for (User::const_op_iterator I = GEP->op_begin()+1, E = GEP->op_end(); I != E; ++I) { Value *Index = *I; - const Type *Ty = *GTI++; + Type *Ty = *GTI++; // Struct indices can't be out of bounds. if (isa(Ty)) continue; @@ -380,7 +380,7 @@ bool Value::isDereferenceablePointer() const { if (CI->isZero()) continue; // Check to see that it's within the bounds of an array. - const ArrayType *ATy = dyn_cast(Ty); + ArrayType *ATy = dyn_cast(Ty); if (!ATy) return false; if (CI->getValue().getActiveBits() > 64) -- cgit v1.2.3