diff options
Diffstat (limited to 'lib')
107 files changed, 1628 insertions, 1628 deletions
diff --git a/lib/Analysis/ConstantRange.cpp b/lib/Analysis/ConstantRange.cpp index 3b91c5bc7a..109ed42cfc 100644 --- a/lib/Analysis/ConstantRange.cpp +++ b/lib/Analysis/ConstantRange.cpp @@ -1,10 +1,10 @@ //===-- ConstantRange.cpp - ConstantRange implementation ------------------===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // Represent a range of possible values that may occur when the program is run @@ -32,7 +32,7 @@ using namespace llvm; static ConstantIntegral *Next(ConstantIntegral *CI) { if (CI->getType() == Type::BoolTy) return CI == ConstantBool::True ? ConstantBool::False : ConstantBool::True; - + Constant *Result = ConstantExpr::getAdd(CI, ConstantInt::get(CI->getType(), 1)); return cast<ConstantIntegral>(Result); @@ -84,7 +84,7 @@ ConstantRange::ConstantRange(Constant *L, Constant *U) : Lower(cast<ConstantIntegral>(L)), Upper(cast<ConstantIntegral>(U)) { assert(Lower->getType() == Upper->getType() && "Incompatible types for ConstantRange!"); - + // Make sure that if L & U are equal that they are either Min or Max... assert((L != U || (L == ConstantIntegral::getMaxValue(L->getType()) || L == ConstantIntegral::getMinValue(L->getType()))) && @@ -126,7 +126,7 @@ const Type *ConstantRange::getType() const { return Lower->getType(); } bool ConstantRange::isFullSet() const { return Lower == Upper && Lower == ConstantIntegral::getMaxValue(getType()); } - + /// isEmptySet - Return true if this set contains no members. /// bool ConstantRange::isEmptySet() const { @@ -140,7 +140,7 @@ bool ConstantRange::isWrappedSet() const { return GT(Lower, Upper); } - + /// getSingleElement - If this set contains a single element, return it, /// otherwise return null. ConstantIntegral *ConstantRange::getSingleElement() const { @@ -158,7 +158,7 @@ uint64_t ConstantRange::getSetSize() const { return 1; return 2; // Must be full set... } - + // Simply subtract the bounds... Constant *Result = ConstantExpr::getSub(Upper, Lower); return cast<ConstantInt>(Result)->getRawValue(); diff --git a/lib/Support/ConstantRange.cpp b/lib/Support/ConstantRange.cpp index 3b91c5bc7a..109ed42cfc 100644 --- a/lib/Support/ConstantRange.cpp +++ b/lib/Support/ConstantRange.cpp @@ -1,10 +1,10 @@ //===-- ConstantRange.cpp - ConstantRange implementation ------------------===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // Represent a range of possible values that may occur when the program is run @@ -32,7 +32,7 @@ using namespace llvm; static ConstantIntegral *Next(ConstantIntegral *CI) { if (CI->getType() == Type::BoolTy) return CI == ConstantBool::True ? ConstantBool::False : ConstantBool::True; - + Constant *Result = ConstantExpr::getAdd(CI, ConstantInt::get(CI->getType(), 1)); return cast<ConstantIntegral>(Result); @@ -84,7 +84,7 @@ ConstantRange::ConstantRange(Constant *L, Constant *U) : Lower(cast<ConstantIntegral>(L)), Upper(cast<ConstantIntegral>(U)) { assert(Lower->getType() == Upper->getType() && "Incompatible types for ConstantRange!"); - + // Make sure that if L & U are equal that they are either Min or Max... assert((L != U || (L == ConstantIntegral::getMaxValue(L->getType()) || L == ConstantIntegral::getMinValue(L->getType()))) && @@ -126,7 +126,7 @@ const Type *ConstantRange::getType() const { return Lower->getType(); } bool ConstantRange::isFullSet() const { return Lower == Upper && Lower == ConstantIntegral::getMaxValue(getType()); } - + /// isEmptySet - Return true if this set contains no members. /// bool ConstantRange::isEmptySet() const { @@ -140,7 +140,7 @@ bool ConstantRange::isWrappedSet() const { return GT(Lower, Upper); } - + /// getSingleElement - If this set contains a single element, return it, /// otherwise return null. ConstantIntegral *ConstantRange::getSingleElement() const { @@ -158,7 +158,7 @@ uint64_t ConstantRange::getSetSize() const { return 1; return 2; // Must be full set... } - + // Simply subtract the bounds... Constant *Result = ConstantExpr::getSub(Upper, Lower); return cast<ConstantInt>(Result)->getRawValue(); diff --git a/lib/Transforms/ExprTypeConvert.cpp b/lib/Transforms/ExprTypeConvert.cpp index 0389daacf7..f43390da83 100644 --- a/lib/Transforms/ExprTypeConvert.cpp +++ b/lib/Transforms/ExprTypeConvert.cpp @@ -1,10 +1,10 @@ //===- ExprTypeConvert.cpp - Code to change an LLVM Expr Type -------------===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This file implements the part of level raising that checks to see if it is @@ -69,7 +69,7 @@ static bool MallocConvertibleToType(MallocInst *MI, const Type *Ty, // here... uint64_t Offset = OffsetVal * OldTypeSize; uint64_t Scale = ScaleVal * OldTypeSize; - + // In order to be successful, both the scale and the offset must be a multiple // of the requested data type's size. // @@ -145,7 +145,7 @@ bool llvm::ExpressionConvertibleToType(Value *V, const Type *Ty, // Expression type must be holdable in a register. if (!Ty->isFirstClassType()) return false; - + ValueTypeCache::iterator CTMI = CTMap.find(V); if (CTMI != CTMap.end()) return CTMI->second == Ty; @@ -154,7 +154,7 @@ bool llvm::ExpressionConvertibleToType(Value *V, const Type *Ty, // if (isa<Constant>(V) && !isa<GlobalValue>(V)) return true; - + CTMap[V] = Ty; if (V->getType() == Ty) return true; // Expression already correct type! @@ -170,7 +170,7 @@ bool llvm::ExpressionConvertibleToType(Value *V, const Type *Ty, // We also do not allow conversion of a cast that casts from a ptr to array // of X to a *X. For example: cast [4 x %List *] * %val to %List * * // - if (const PointerType *SPT = + if (const PointerType *SPT = dyn_cast<PointerType>(I->getOperand(0)->getType())) if (const PointerType *DPT = dyn_ca |