summaryrefslogtreecommitdiff
path: root/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
commitc137120bb047a7017cbab21f5f9c9e6f65e2b84f (patch)
tree146a56f5331f05c10548bd0ca1f7bc0726f3ed8f /lib/VMCore/BasicBlock.cpp
parent691c05bb29d3e2ec9c2ed6b1c082ce5d484b75da (diff)
downloadllvm-c137120bb047a7017cbab21f5f9c9e6f65e2b84f.tar.gz
llvm-c137120bb047a7017cbab21f5f9c9e6f65e2b84f.tar.bz2
llvm-c137120bb047a7017cbab21f5f9c9e6f65e2b84f.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133434 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/BasicBlock.cpp')
-rw-r--r--lib/VMCore/BasicBlock.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/VMCore/BasicBlock.cpp b/lib/VMCore/BasicBlock.cpp
index 955a0285b2..3f1a6a99b6 100644
--- a/lib/VMCore/BasicBlock.cpp
+++ b/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()));