diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2004-09-15 17:06:42 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2004-09-15 17:06:42 +0000 |
commit | 2da5c3dda6f5b9c4ec6d55008d33327764364bd4 (patch) | |
tree | ed7e2551f4d2fd2c276d842f289b4471b9d47843 /lib/Analysis/LoopInfo.cpp | |
parent | 7e0e9c635f5439426252bd1ccbfa90b878ba0ca6 (diff) | |
download | external_llvm-2da5c3dda6f5b9c4ec6d55008d33327764364bd4.zip external_llvm-2da5c3dda6f5b9c4ec6d55008d33327764364bd4.tar.gz external_llvm-2da5c3dda6f5b9c4ec6d55008d33327764364bd4.tar.bz2 |
Convert code to compile with vc7.1.
Patch contributed by Paolo Invernizzi. Thanks Paolo!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16368 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/LoopInfo.cpp')
-rw-r--r-- | lib/Analysis/LoopInfo.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Analysis/LoopInfo.cpp b/lib/Analysis/LoopInfo.cpp index 8b9b11a..0444c84 100644 --- a/lib/Analysis/LoopInfo.cpp +++ b/lib/Analysis/LoopInfo.cpp @@ -404,15 +404,15 @@ PHINode *Loop::getCanonicalInductionVariable() const { return 0; // Loop over all of the PHI nodes, looking for a canonical indvar. - for (BasicBlock::iterator I = H->begin(); - PHINode *PN = dyn_cast<PHINode>(I); ++I) + for (BasicBlock::iterator I = H->begin(); isa<PHINode>(I); ++I) { + PHINode *PN = cast<PHINode>(I); if (Instruction *Inc = dyn_cast<Instruction>(PN->getIncomingValueForBlock(Backedge))) if (Inc->getOpcode() == Instruction::Add && Inc->getOperand(0) == PN) if (ConstantInt *CI = dyn_cast<ConstantInt>(Inc->getOperand(1))) if (CI->equalsInt(1)) return PN; - + } return 0; } |