summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/WinException.h
diff options
context:
space:
mode:
authorJoseph Tremoulet <jotrem@microsoft.com>2015-10-13 20:18:27 +0000
committerJoseph Tremoulet <jotrem@microsoft.com>2015-10-13 20:18:27 +0000
commit28c89bbb365c77cf15d3ec8bd7b982cba454057c (patch)
tree645d46fc608a3e84f1d431745114eafbe5b7f4c3 /llvm/lib/CodeGen/AsmPrinter/WinException.h
parenta73371a9b72fa41351706c48f90142b2283f46da (diff)
downloadbcm5719-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.h5
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
OpenPOWER on IntegriCloud