summaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
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
commit5e5974f51ad079a3ed890ca8be1d3f50150320ad (patch)
tree25211bf8cdf0c2ad77a6d145f84c2103d499bf8e /lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
parent06df83c25a7b07b3a19a40bd680c0a205bcc0b9a (diff)
downloadllvm-5e5974f51ad079a3ed890ca8be1d3f50150320ad.tar.gz
llvm-5e5974f51ad079a3ed890ca8be1d3f50150320ad.tar.bz2
llvm-5e5974f51ad079a3ed890ca8be1d3f50150320ad.tar.xz
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176154 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index b8ab2a9c1b..e3c2c2e8ef 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/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);