diff options
author | Chris Lattner <sabre@nondot.org> | 2009-08-18 04:33:15 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-08-18 04:33:15 +0000 |
commit | 249e1acf1b96ab7a2db93cb8009461a5ef90445c (patch) | |
tree | 93dfa1250d6da094891eed59e61451af396538ce /llvm/lib/CodeGen/MachineBasicBlock.cpp | |
parent | 523d2f6e2c6e14a57da815f7d8eefcb2f3cffd30 (diff) | |
download | bcm5719-llvm-249e1acf1b96ab7a2db93cb8009461a5ef90445c.tar.gz bcm5719-llvm-249e1acf1b96ab7a2db93cb8009461a5ef90445c.zip |
fix accidentally inverted conditional and add comment.
llvm-svn: 79312
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBasicBlock.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp index eacc8973d13..f261674ca19 100644 --- a/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp @@ -128,6 +128,9 @@ MachineBasicBlock::iterator MachineBasicBlock::getFirstTerminator() { return I; } +/// isOnlyReachableViaFallthough - Return true if this basic block has +/// exactly one predecessor and the control transfer mechanism between +/// the predecessor and this block is a fall-through. bool MachineBasicBlock::isOnlyReachableByFallthrough() const { // If this is a landing pad, it isn't a fall through. If it has no preds, // then nothing falls through to it. @@ -152,7 +155,7 @@ bool MachineBasicBlock::isOnlyReachableByFallthrough() const { // Otherwise, check the last instruction. const MachineInstr &LastInst = Pred->back(); - return LastInst.getDesc().isBarrier(); + return !LastInst.getDesc().isBarrier(); } void MachineBasicBlock::dump() const { |