diff options
| author | David Majnemer <david.majnemer@gmail.com> | 2015-03-31 22:35:44 +0000 |
|---|---|---|
| committer | David Majnemer <david.majnemer@gmail.com> | 2015-03-31 22:35:44 +0000 |
| commit | a225a19dd0739024f6a232d601c381d217483ca8 (patch) | |
| tree | e6a8e66c4c9342738f47595835c157a9101bcce5 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | |
| parent | 6a9c46bc3f02573c51eb7eaf48872423f18f4745 (diff) | |
| download | bcm5719-llvm-a225a19dd0739024f6a232d601c381d217483ca8.tar.gz bcm5719-llvm-a225a19dd0739024f6a232d601c381d217483ca8.zip | |
[WinEH] Generate .xdata for catch handlers
This lets us catch exceptions in simple cases.
N.B. Things that do not work include (but are not limited to):
- Throwing from within a catch handler.
- Catching an object with a named catch parameter.
- 'CatchHigh' is fictitious, we aren't sure of its purpose.
- We aren't entirely efficient with regards to the number of EH states
that we generate.
- IP-to-State tables are sensitive to the order of emission.
llvm-svn: 233767
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index fd9d7e6b69a..fa58614a4b3 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -5450,18 +5450,6 @@ 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]; - MachineFunction &MF = DAG.getMachineFunction(); - const Function *F = MF.getFunction(); - MachineModuleInfo &MMI = MF.getMMI(); - MMI.getWinEHFuncInfo(F).CatchHandlerParentFrameObjIdx[F] = FI; - return nullptr; - } case Intrinsic::eh_unwindhelp: { AllocaInst *Slot = cast<AllocaInst>(I.getArgOperand(0)->stripPointerCasts()); |

