aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/InductionVariable.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-06-25 16:13:24 +0000
committerChris Lattner <sabre@nondot.org>2002-06-25 16:13:24 +0000
commit7e70829632f82de15db187845666aaca6e04b792 (patch)
tree48dd2d804e7ebec9a3cbd8bf229cb2a2aa20dce5 /lib/Analysis/InductionVariable.cpp
parent0b12b5f50ec77a8bd01b92d287c52d748619bb4b (diff)
MEGAPATCH checkin.
For details, See: docs/2002-06-25-MegaPatchInfo.txt git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2779 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/InductionVariable.cpp')
-rw-r--r--lib/Analysis/InductionVariable.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Analysis/InductionVariable.cpp b/lib/Analysis/InductionVariable.cpp
index b3da95f090..8637a1ab7e 100644
--- a/lib/Analysis/InductionVariable.cpp
+++ b/lib/Analysis/InductionVariable.cpp
@@ -31,8 +31,8 @@ static bool isLoopInvariant(const Value *V, const Loop *L) {
if (isa<Constant>(V) || isa<Argument>(V) || isa<GlobalValue>(V))
return true;
- Instruction *I = cast<Instruction>(V);
- BasicBlock *BB = I->getParent();
+ const Instruction *I = cast<Instruction>(V);
+ const BasicBlock *BB = I->getParent();
return !L->contains(BB);
}
@@ -41,8 +41,8 @@ enum InductionVariable::iType
InductionVariable::Classify(const Value *Start, const Value *Step,
const Loop *L = 0) {
// Check for cannonical and simple linear expressions now...
- if (ConstantInt *CStart = dyn_cast<ConstantInt>(Start))
- if (ConstantInt *CStep = dyn_cast<ConstantInt>(Step)) {
+ if (const ConstantInt *CStart = dyn_cast<ConstantInt>(Start))
+ if (const ConstantInt *CStep = dyn_cast<ConstantInt>(Step)) {
if (CStart->equalsInt(0) && CStep->equalsInt(1))
return Cannonical;
else