summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/BasicBlock.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2011-06-20 14:18:48 +0000
committerJay Foad <jay.foad@gmail.com>2011-06-20 14:18:48 +0000
commit372ad64b4db770404805a5ca88ab9d78bea3c386 (patch)
treec2e5ffa958e080d5f5542dde76d47c728cab2ec5 /llvm/lib/VMCore/BasicBlock.cpp
parent5c54d75763d0a21d2b8e45ce1cd9b3f201164112 (diff)
downloadbcm5719-llvm-372ad64b4db770404805a5ca88ab9d78bea3c386.tar.gz
bcm5719-llvm-372ad64b4db770404805a5ca88ab9d78bea3c386.zip
Make better use of the PHINode API.
Change various bits of code to make better use of the existing PHINode API, to insulate them from forthcoming changes in how PHINodes store their operands. llvm-svn: 133434
Diffstat (limited to 'llvm/lib/VMCore/BasicBlock.cpp')
-rw-r--r--llvm/lib/VMCore/BasicBlock.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/BasicBlock.cpp b/llvm/lib/VMCore/BasicBlock.cpp
index 955a0285b26..3f1a6a99b64 100644
--- a/llvm/lib/VMCore/BasicBlock.cpp
+++ b/llvm/lib/VMCore/BasicBlock.cpp
@@ -227,8 +227,8 @@ void BasicBlock::removePredecessor(BasicBlock *Pred,
// If the PHI _HAD_ two uses, replace PHI node with its now *single* value
if (max_idx == 2) {
- if (PN->getOperand(0) != PN)
- PN->replaceAllUsesWith(PN->getOperand(0));
+ if (PN->getIncomingValue(0) != PN)
+ PN->replaceAllUsesWith(PN->getIncomingValue(0));
else
// We are left with an infinite loop with no entries: kill the PHI.
PN->replaceAllUsesWith(UndefValue::get(PN->getType()));
OpenPOWER on IntegriCloud