summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2015-09-17 17:19:40 +0000
committerReid Kleckner <rnk@google.com>2015-09-17 17:19:40 +0000
commited17079b52247dc27b36c5b242634c304cf697fb (patch)
tree6d5aa9e53c987e05e719b2187bb5dded121aefd2 /llvm/lib/CodeGen/MachineBasicBlock.cpp
parent37e56318ec2e4a08974fedd99cfacbe7b9613392 (diff)
downloadbcm5719-llvm-ed17079b52247dc27b36c5b242634c304cf697fb.tar.gz
bcm5719-llvm-ed17079b52247dc27b36c5b242634c304cf697fb.zip
[WinEH] Add and use hasEHPadSuccessor instead of getLandingPadSuccessor
getLandingPadSuccessor assumes that each invoke can have at most one EH pad successor, but WinEH invokes can have more than one. Two out of three callers of getLandingPadSuccessor don't use the returned landingpad, so we can make them use this simple predicate instead. Eventually we'll have to circle back and fix SplitKit.cpp so that register allocation works. Baby steps. llvm-svn: 247904
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineBasicBlock.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp
index a968ab95146..e4d6e66b6e7 100644
--- a/llvm/lib/CodeGen/MachineBasicBlock.cpp
+++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp
@@ -208,6 +208,13 @@ const MachineBasicBlock *MachineBasicBlock::getLandingPadSuccessor() const {
return nullptr;
}
+bool MachineBasicBlock::hasEHPadSuccessor() const {
+ for (const_succ_iterator I = succ_begin(), E = succ_end(); I != E; ++I)
+ if ((*I)->isEHPad())
+ return true;
+ return false;
+}
+
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
void MachineBasicBlock::dump() const {
print(dbgs());
OpenPOWER on IntegriCloud