summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/WinException.h
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2015-05-29 17:00:57 +0000
committerReid Kleckner <reid@kleckner.net>2015-05-29 17:00:57 +0000
commit1d3d4adbb9b54cc921f21f97506197acf80a0778 (patch)
tree084fff7c92f1004ee8e30560bd191efe4c3ed514 /llvm/lib/CodeGen/AsmPrinter/WinException.h
parent995dde27995e3f957966fd52d721d65d60bda43b (diff)
downloadbcm5719-llvm-1d3d4adbb9b54cc921f21f97506197acf80a0778.tar.gz
bcm5719-llvm-1d3d4adbb9b54cc921f21f97506197acf80a0778.zip
[WinEH] Emit EH tables for __CxxFrameHandler3 on 32-bit x86
Small (really small!) C++ exception handling examples work on 32-bit x86 now. This change disables the use of .seh_* directives in WinException when CFI is not in use. It also uses absolute symbol references in the tables instead of imagerel32 relocations. Also fixes a cache invalidation bug in MMI personality classification. llvm-svn: 238575
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/WinException.h')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/WinException.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/WinException.h b/llvm/lib/CodeGen/AsmPrinter/WinException.h
index ee5f122a49d..478899b79da 100644
--- a/llvm/lib/CodeGen/AsmPrinter/WinException.h
+++ b/llvm/lib/CodeGen/AsmPrinter/WinException.h
@@ -17,26 +17,34 @@
#include "EHStreamer.h"
namespace llvm {
+class Function;
class GlobalValue;
class MachineFunction;
class MCExpr;
+struct WinEHFuncInfo;
class WinException : public EHStreamer {
/// Per-function flag to indicate if personality info should be emitted.
- bool shouldEmitPersonality;
+ bool shouldEmitPersonality = false;
/// Per-function flag to indicate if the LSDA should be emitted.
- bool shouldEmitLSDA;
+ bool shouldEmitLSDA = false;
/// Per-function flag to indicate if frame moves info should be emitted.
- bool shouldEmitMoves;
+ bool shouldEmitMoves = false;
+
+ /// True if this is a 64-bit target and we should use image relative offsets.
+ bool useImageRel32 = false;
void emitCSpecificHandlerTable();
void emitCXXFrameHandler3Table(const MachineFunction *MF);
- const MCExpr *createImageRel32(const MCSymbol *Value);
- const MCExpr *createImageRel32(const GlobalValue *GV);
+ void extendIP2StateTable(const MachineFunction *MF, const Function *ParentF,
+ WinEHFuncInfo &FuncInfo);
+
+ const MCExpr *create32bitRef(const MCSymbol *Value);
+ const MCExpr *create32bitRef(const GlobalValue *GV);
public:
//===--------------------------------------------------------------------===//
OpenPOWER on IntegriCloud