summaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/InlineFunction.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-09-15 17:06:42 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-09-15 17:06:42 +0000
commit2da5c3dda6f5b9c4ec6d55008d33327764364bd4 (patch)
treeed7e2551f4d2fd2c276d842f289b4471b9d47843 /lib/Transforms/Utils/InlineFunction.cpp
parent7e0e9c635f5439426252bd1ccbfa90b878ba0ca6 (diff)
downloadllvm-2da5c3dda6f5b9c4ec6d55008d33327764364bd4.tar.gz
llvm-2da5c3dda6f5b9c4ec6d55008d33327764364bd4.tar.bz2
llvm-2da5c3dda6f5b9c4ec6d55008d33327764364bd4.tar.xz
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/Transforms/Utils/InlineFunction.cpp')
-rw-r--r--lib/Transforms/Utils/InlineFunction.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/Transforms/Utils/InlineFunction.cpp b/lib/Transforms/Utils/InlineFunction.cpp
index 51fbd14ebf..9f47825454 100644
--- a/lib/Transforms/Utils/InlineFunction.cpp
+++ b/lib/Transforms/Utils/InlineFunction.cpp
@@ -111,10 +111,11 @@ bool llvm::InlineFunction(CallSite CS) {
// If there are PHI nodes in the exceptional destination block, we need to
// keep track of which values came into them from this invoke, then remove
// the entry for this block.
- for (BasicBlock::iterator I = InvokeDest->begin();
- PHINode *PN = dyn_cast<PHINode>(I); ++I)
+ for (BasicBlock::iterator I = InvokeDest->begin(); isa<PHINode>(I); ++I) {
+ PHINode *PN = cast<PHINode>(I);
// Save the value to use for this edge...
InvokeDestPHIValues.push_back(PN->getIncomingValueForBlock(OrigBB));
+ }
for (Function::iterator BB = FirstNewBlock, E = Caller->end();
BB != E; ++BB) {
@@ -149,8 +150,10 @@ bool llvm::InlineFunction(CallSite CS) {
// there is now a new entry in them.
unsigned i = 0;
for (BasicBlock::iterator I = InvokeDest->begin();
- PHINode *PN = dyn_cast<PHINode>(I); ++I, ++i)
+ isa<PHINode>(I); ++I, ++i) {
+ PHINode *PN = cast<PHINode>(I);
PN->addIncoming(InvokeDestPHIValues[i], BB);
+ }
// This basic block is now complete, start scanning the next one.
break;
@@ -174,8 +177,10 @@ bool llvm::InlineFunction(CallSite CS) {
// there is now a new entry in them.
unsigned i = 0;
for (BasicBlock::iterator I = InvokeDest->begin();
- PHINode *PN = dyn_cast<PHINode>(I); ++I, ++i)
+ isa<PHINode>(I); ++I, ++i) {
+ PHINode *PN = cast<PHINode>(I);
PN->addIncoming(InvokeDestPHIValues[i], BB);
+ }
}
}