diff options
author | Joseph Tremoulet <jotrem@microsoft.com> | 2015-10-13 20:18:27 +0000 |
---|---|---|
committer | Joseph Tremoulet <jotrem@microsoft.com> | 2015-10-13 20:18:27 +0000 |
commit | 28c89bbb365c77cf15d3ec8bd7b982cba454057c (patch) | |
tree | 645d46fc608a3e84f1d431745114eafbe5b7f4c3 /llvm/lib/CodeGen/AsmPrinter/WinException.h | |
parent | a73371a9b72fa41351706c48f90142b2283f46da (diff) | |
download | bcm5719-llvm-28c89bbb365c77cf15d3ec8bd7b982cba454057c.tar.gz bcm5719-llvm-28c89bbb365c77cf15d3ec8bd7b982cba454057c.zip |
[WinEH] Add CoreCLR EH table emission
Summary:
Emit the handler and clause locations immediately after the standard
xdata.
Clauses are emitted in the same order and format used to communiate them
to the CLR Execution Engine.
Add a lit test to verify correct table generation on a small but
interesting example function.
Reviewers: majnemer, andrew.w.kaylor, rnk
Subscribers: pgavlin, AndyAyers, llvm-commits
Differential Revision: http://reviews.llvm.org/D13451
llvm-svn: 250219
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/WinException.h')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/WinException.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/WinException.h b/llvm/lib/CodeGen/AsmPrinter/WinException.h index 06a5fb43849..e553c3ff736 100644 --- a/llvm/lib/CodeGen/AsmPrinter/WinException.h +++ b/llvm/lib/CodeGen/AsmPrinter/WinException.h @@ -54,6 +54,8 @@ class LLVM_LIBRARY_VISIBILITY WinException : public EHStreamer { /// tables. void emitExceptHandlerTable(const MachineFunction *MF); + void emitCLRExceptionTable(const MachineFunction *MF); + void computeIP2StateTable( const MachineFunction *MF, WinEHFuncInfo &FuncInfo, SmallVectorImpl<std::pair<const MCExpr *, int>> &IPToStateTable); @@ -66,6 +68,9 @@ class LLVM_LIBRARY_VISIBILITY WinException : public EHStreamer { const MCExpr *create32bitRef(const MCSymbol *Value); const MCExpr *create32bitRef(const Value *V); const MCExpr *getLabelPlusOne(const MCSymbol *Label); + const MCExpr *getOffset(const MCSymbol *OffsetOf, const MCSymbol *OffsetFrom); + const MCExpr *getOffsetPlusOne(const MCSymbol *OffsetOf, + const MCSymbol *OffsetFrom); /// Gets the offset that we should use in a table for a stack object with the /// given index. For targets using CFI (Win64, etc), this is relative to the |