summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2012-04-24 19:06:55 +0000
committerEvan Cheng <evan.cheng@apple.com>2012-04-24 19:06:55 +0000
commit2d14d8aca13f02c95783e6d8b9b0dea2e0407d38 (patch)
treeecee5f4ae71decde24fb88f7c99429bf3dca2a2d /llvm/lib/CodeGen/MachineBasicBlock.cpp
parent84531c2b5f749543fa236c78eae49a5928064283 (diff)
downloadbcm5719-llvm-2d14d8aca13f02c95783e6d8b9b0dea2e0407d38.tar.gz
bcm5719-llvm-2d14d8aca13f02c95783e6d8b9b0dea2e0407d38.zip
MachineBasicBlock::SplitCriticalEdge() should follow LLVM IR variant and refuse to break edge to EH landing pad. rdar://11300144
llvm-svn: 155470
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineBasicBlock.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp
index 1abb8f240cc..cf885251d6d 100644
--- a/llvm/lib/CodeGen/MachineBasicBlock.cpp
+++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp
@@ -596,6 +596,11 @@ bool MachineBasicBlock::canFallThrough() {
MachineBasicBlock *
MachineBasicBlock::SplitCriticalEdge(MachineBasicBlock *Succ, Pass *P) {
+ // Splitting the critical edge to a landing pad block is non-trivial. Don't do
+ // it in this generic function.
+ if (Succ->isLandingPad())
+ return NULL;
+
MachineFunction *MF = getParent();
DebugLoc dl; // FIXME: this is nowhere
OpenPOWER on IntegriCloud