summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorManman Ren <mren@apple.com>2013-02-27 02:11:57 +0000
committerManman Ren <mren@apple.com>2013-02-27 02:11:57 +0000
commit683f59b36c80753e6bff63e43871109bceff6eac (patch)
treeaa9d76d837cc50c36c93637440e9ffdc890f0b41 /llvm/lib/CodeGen/SelectionDAG
parent954aaaf76b0dc5a7a30160ee06dc025d7a501a17 (diff)
downloadbcm5719-llvm-683f59b36c80753e6bff63e43871109bceff6eac.tar.gz
bcm5719-llvm-683f59b36c80753e6bff63e43871109bceff6eac.zip
SelectionDAG: If llvm.donothing has a landingpad, we should clear
CurrentCallSite to avoid an assertion failure: assert(MMI.getCurrentCallSite() == 0 && "Overlapping call sites!"); rdar://problem/13228754 llvm-svn: 176154
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index b8ab2a9c1bc..e3c2c2e8ef5 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -1872,6 +1872,13 @@ void SelectionDAGBuilder::visitInvoke(const InvokeInst &I) {
visitInlineAsm(&I);
else if (Fn && Fn->isIntrinsic()) {
assert(Fn->getIntrinsicID() == Intrinsic::donothing);
+ // If donothing has a landingpad, we should clear CurrentCallSite.
+ if (LandingPad) {
+ MachineModuleInfo &MMI = DAG.getMachineFunction().getMMI();
+ unsigned CallSiteIndex = MMI.getCurrentCallSite();
+ if (CallSiteIndex)
+ MMI.setCurrentCallSite(0);
+ }
// Ignore invokes to @llvm.donothing: jump directly to the next BB.
} else
LowerCallTo(&I, getValue(Callee), false, LandingPad);
OpenPOWER on IntegriCloud