diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-07-30 17:36:47 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-07-30 17:36:47 +0000 |
commit | f192b507a33b2ab2e2f6271bb1ea6ed4fbda69e7 (patch) | |
tree | 7c3710f48b15574a38d629954464e3af71b6005f /include | |
parent | 97baaeaeb22e7336590b8745bd181425ca410cb5 (diff) | |
download | external_llvm-f192b507a33b2ab2e2f6271bb1ea6ed4fbda69e7.zip external_llvm-f192b507a33b2ab2e2f6271bb1ea6ed4fbda69e7.tar.gz external_llvm-f192b507a33b2ab2e2f6271bb1ea6ed4fbda69e7.tar.bz2 |
Add MachineBasicBlock::isPredecessor().
A->isPredecessor(B) is the same as B->isSuccessor(A), but it can
tolerate a B that is null or dangling. This shouldn't happen normally,
but it it useful for verification code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160968 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/CodeGen/MachineBasicBlock.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineBasicBlock.h b/include/llvm/CodeGen/MachineBasicBlock.h index 4371aa5..c917bd8 100644 --- a/include/llvm/CodeGen/MachineBasicBlock.h +++ b/include/llvm/CodeGen/MachineBasicBlock.h @@ -379,6 +379,10 @@ public: /// which refer to fromMBB to refer to this. void transferSuccessorsAndUpdatePHIs(MachineBasicBlock *fromMBB); + /// isPredecessor - Return true if the specified MBB is a predecessor of this + /// block. + bool isPredecessor(const MachineBasicBlock *MBB) const; + /// isSuccessor - Return true if the specified MBB is a successor of this /// block. bool isSuccessor(const MachineBasicBlock *MBB) const; |