[llvm-commits] CVS: llvm/lib/VMCore/BasicBlock.cpp
Chris Lattner
lattner at cs.uiuc.edu
Fri Jun 4 19:16:01 PDT 2004
Changes in directory llvm/lib/VMCore:
BasicBlock.cpp updated: 1.44 -> 1.45
---
Log message:
As much as I dislike doing this, it's the only fix for VC8.0 that I can come
up with, even though it's perfectly conformant code. :(
---
Diffs of the changes: (+4 -2)
Index: llvm/lib/VMCore/BasicBlock.cpp
diff -u llvm/lib/VMCore/BasicBlock.cpp:1.44 llvm/lib/VMCore/BasicBlock.cpp:1.45
--- llvm/lib/VMCore/BasicBlock.cpp:1.44 Fri Apr 16 12:37:12 2004
+++ llvm/lib/VMCore/BasicBlock.cpp Fri Jun 4 19:11:27 2004
@@ -181,7 +181,8 @@
} else {
// Okay, now we know that we need to remove predecessor #pred_idx from all
// PHI nodes. Iterate over each PHI node fixing them up
- for (iterator II = begin(); PHINode *PN = dyn_cast<PHINode>(II); ++II)
+ PHINode *PN;
+ for (iterator II = begin(); PN = dyn_cast<PHINode>(II); ++II)
PN->removeIncomingValue(Pred);
}
}
@@ -221,8 +222,9 @@
// Loop over any phi nodes in the basic block, updating the BB field of
// incoming values...
BasicBlock *Successor = *I;
+ PHINode *PN;
for (BasicBlock::iterator II = Successor->begin();
- PHINode *PN = dyn_cast<PHINode>(II); ++II) {
+ PN = dyn_cast<PHINode>(II); ++II) {
int IDX = PN->getBasicBlockIndex(this);
while (IDX != -1) {
PN->setIncomingBlock((unsigned)IDX, New);
More information about the llvm-commits
mailing list