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 | 6614946443f3df8c4d7263455302a5734f2c1ce3 (patch) | |
tree | 18fcacf016ff4c3e33495269840e35970ce04922 /llvm/lib/Transforms/Scalar/LowerSwitch.cpp | |
parent | f38ee634230a7acf95d9a42a7867ceca11754576 (diff) | |
download | bcm5719-llvm-6614946443f3df8c4d7263455302a5734f2c1ce3.tar.gz bcm5719-llvm-6614946443f3df8c4d7263455302a5734f2c1ce3.zip |
Convert code to compile with vc7.1.
Patch contributed by Paolo Invernizzi. Thanks Paolo!
llvm-svn: 16368
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LowerSwitch.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LowerSwitch.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Scalar/LowerSwitch.cpp b/llvm/lib/Transforms/Scalar/LowerSwitch.cpp index ef684e7b89d..242343f652d 100644 --- a/llvm/lib/Transforms/Scalar/LowerSwitch.cpp +++ b/llvm/lib/Transforms/Scalar/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); |