From b919dd693facc577c2da6d2916981e8d9247556c Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Fri, 27 Mar 2015 04:17:07 +0000 Subject: 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 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/SelectionDAG') 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(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(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; } -- cgit v1.2.3