aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-04-17 17:36:12 +0000
committerChris Lattner <sabre@nondot.org>2007-04-17 17:36:12 +0000
commit4d8c16f15a9ee1b646e385bddd20a4a069e2885b (patch)
tree4fa4ea81b24f23493cae83fcfb27416f69df0d11 /lib
parentd15dff24c6a3712298e16453eb8d09c4404563a5 (diff)
downloadexternal_llvm-4d8c16f15a9ee1b646e385bddd20a4a069e2885b.zip
external_llvm-4d8c16f15a9ee1b646e385bddd20a4a069e2885b.tar.gz
external_llvm-4d8c16f15a9ee1b646e385bddd20a4a069e2885b.tar.bz2
eliminate a use of Instruction::getPrev(), patch by Gabor Greif in 2005.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36197 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/VMCore/Verifier.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp
index d09f157..98f2649 100644
--- a/lib/VMCore/Verifier.cpp
+++ b/lib/VMCore/Verifier.cpp
@@ -640,7 +640,8 @@ void Verifier::visitPHINode(PHINode &PN) {
// This can be tested by checking whether the instruction before this is
// either nonexistent (because this is begin()) or is a PHI node. If not,
// then there is some other instruction before a PHI.
- Assert2(&PN.getParent()->front() == &PN || isa<PHINode>(PN.getPrev()),
+ Assert2(&PN == &PN.getParent()->front() ||
+ isa<PHINode>(--BasicBlock::iterator(&PN)),
"PHI nodes not grouped at top of basic block!",
&PN, PN.getParent());