aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/LowerSwitch.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/LowerSwitch.cpp
parent7e0e9c635f5439426252bd1ccbfa90b878ba0ca6 (diff)
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/LowerSwitch.cpp')
-rw-r--r--lib/Transforms/Utils/LowerSwitch.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Transforms/Utils/LowerSwitch.cpp b/lib/Transforms/Utils/LowerSwitch.cpp
index ef684e7b89..242343f652 100644
--- a/lib/Transforms/Utils/LowerSwitch.cpp
+++ b/lib/Transforms/Utils/LowerSwitch.cpp
@@ -160,8 +160,8 @@ BasicBlock* LowerSwitch::newLeafBlock(Case& Leaf, Value* Val,
// If there were any PHI nodes in this successor, rewrite one entry
// from OrigBlock to come from NewLeaf.
- for (BasicBlock::iterator I = Succ->begin();
- PHINode* PN = dyn_cast<PHINode>(I); ++I) {
+ for (BasicBlock::iterator I = Succ->begin(); isa<PHINode>(I); ++I) {
+ PHINode* PN = cast<PHINode>(I);
int BlockIdx = PN->getBasicBlockIndex(OrigBlock);
assert(BlockIdx != -1 && "Switch didn't go to this successor??");
PN->setIncomingBlock((unsigned)BlockIdx, NewLeaf);
@@ -196,8 +196,8 @@ void LowerSwitch::processSwitchInst(SwitchInst *SI) {
// If there is an entry in any PHI nodes for the default edge, make sure
// to update them as well.
- for (BasicBlock::iterator I = Default->begin();
- PHINode *PN = dyn_cast<PHINode>(I); ++I) {
+ for (BasicBlock::iterator I = Default->begin(); isa<PHINode>(I); ++I) {
+ PHINode *PN = cast<PHINode>(I);
int BlockIdx = PN->getBasicBlockIndex(OrigBlock);
assert(BlockIdx != -1 && "Switch didn't go to this successor??");
PN->setIncomingBlock((unsigned)BlockIdx, NewDefault);