summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2016-04-25 14:31:32 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2016-04-25 14:31:32 +0000
commitdd215236530c9f643220f1c6e928dd39254a7b3d (patch)
tree787fe15de5cb8bdd2634b804c155527633df0fc8 /llvm/include
parent82d04260b71939da9fd7918555232796d2873a79 (diff)
downloadbcm5719-llvm-dd215236530c9f643220f1c6e928dd39254a7b3d.tar.gz
bcm5719-llvm-dd215236530c9f643220f1c6e928dd39254a7b3d.zip
[WinEH] Update SplitAnalysis::computeLastSplitPoint to cope with multiple EH successors
We didn't have logic to correctly handle CFGs where there was more than one EH-pad successor (these are novel with WinEH). There were situations where a register was live in one exceptional successor but not another but the code as written would only consider the first exceptional successor it found. This resulted in split points which were insufficiently early if an invoke was present. This fixes PR27501. N.B. This removes getLandingPadSuccessor. llvm-svn: 267412
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/ADT/STLExtras.h8
-rw-r--r--llvm/include/llvm/CodeGen/MachineBasicBlock.h4
2 files changed, 8 insertions, 4 deletions
diff --git a/llvm/include/llvm/ADT/STLExtras.h b/llvm/include/llvm/ADT/STLExtras.h
index 0d547c29572..11be19607f8 100644
--- a/llvm/include/llvm/ADT/STLExtras.h
+++ b/llvm/include/llvm/ADT/STLExtras.h
@@ -383,6 +383,14 @@ bool any_of(R &&Range, UnaryPredicate &&P) {
std::forward<UnaryPredicate>(P));
}
+/// Provide wrappers to std::none_of which take ranges instead of having to pass
+/// begin/end explicitly.
+template <typename R, class UnaryPredicate>
+bool none_of(R &&Range, UnaryPredicate &&P) {
+ return std::none_of(Range.begin(), Range.end(),
+ std::forward<UnaryPredicate>(P));
+}
+
/// Provide wrappers to std::find which take ranges instead of having to pass
/// begin/end explicitly.
template<typename R, class T>
diff --git a/llvm/include/llvm/CodeGen/MachineBasicBlock.h b/llvm/include/llvm/CodeGen/MachineBasicBlock.h
index da30243bcd4..d0ff0c978ba 100644
--- a/llvm/include/llvm/CodeGen/MachineBasicBlock.h
+++ b/llvm/include/llvm/CodeGen/MachineBasicBlock.h
@@ -342,10 +342,6 @@ public:
/// via an exception handler.
void setIsEHPad(bool V = true) { IsEHPad = V; }
- /// If this block has a successor that is a landing pad, return it. Otherwise
- /// return NULL.
- const MachineBasicBlock *getLandingPadSuccessor() const;
-
bool hasEHPadSuccessor() const;
/// Returns true if this is the entry block of an EH funclet.
OpenPOWER on IntegriCloud