summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-03-27 04:17:07 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-03-27 04:17:07 +0000
commitb919dd693facc577c2da6d2916981e8d9247556c (patch)
treee5641b6973523d6c9aca06664edccedf17da9a04 /llvm/lib/CodeGen/SelectionDAG
parent46863e556555fe431dfcff374872933832bb0405 (diff)
downloadbcm5719-llvm-b919dd693facc577c2da6d2916981e8d9247556c.tar.gz
bcm5719-llvm-b919dd693facc577c2da6d2916981e8d9247556c.zip
WinEH: Create a parent frame alloca for HandlerType xdata tables
We don't have any logic to emit those tables yet, so the SDAG lowering of this intrinsic is just a stub. We can see the intrinsic in the prepared IR, though. llvm-svn: 233354
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index 6c14e7969c5..6a08fff09cd 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -5446,13 +5446,23 @@ SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I, unsigned Intrinsic) {
case Intrinsic::eh_begincatch:
case Intrinsic::eh_endcatch:
llvm_unreachable("begin/end catch intrinsics not lowered in codegen");
+ case Intrinsic::eh_parentframe: {
+ AllocaInst *Slot =
+ cast<AllocaInst>(I.getArgOperand(0)->stripPointerCasts());
+ assert(FuncInfo.StaticAllocaMap.count(Slot) &&
+ "can only use static allocas with llvm.eh.parentframe");
+ int FI = FuncInfo.StaticAllocaMap[Slot];
+ // TODO: Save this in the not-yet-existent WinEHFuncInfo struct.
+ (void)FI;
+ return nullptr;
+ }
case Intrinsic::eh_unwindhelp: {
AllocaInst *Slot =
cast<AllocaInst>(I.getArgOperand(0)->stripPointerCasts());
assert(FuncInfo.StaticAllocaMap.count(Slot) &&
"can only use static allocas with llvm.eh.unwindhelp");
int FI = FuncInfo.StaticAllocaMap[Slot];
- // TODO: Save this in the not-yet-existant WinEHFuncInfo struct.
+ // TODO: Save this in the not-yet-existent WinEHFuncInfo struct.
(void)FI;
return nullptr;
}
OpenPOWER on IntegriCloud