aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCStreamer.cpp
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/MC/MCStreamer.cpp
parent995dde27995e3f957966fd52d721d65d60bda43b (diff)
downloadllvm-1d3d4adbb9b54cc921f21f97506197acf80a0778.zip
llvm-1d3d4adbb9b54cc921f21f97506197acf80a0778.tar.gz
llvm-1d3d4adbb9b54cc921f21f97506197acf80a0778.tar.bz2
[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/MC/MCStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCStreamer.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCStreamer.cpp b/llvm/lib/MC/MCStreamer.cpp
index 71d4b06..03ef7ed 100644
--- a/llvm/lib/MC/MCStreamer.cpp
+++ b/llvm/lib/MC/MCStreamer.cpp
@@ -391,11 +391,17 @@ void MCStreamer::EmitCFIWindowSave() {
}
void MCStreamer::EnsureValidWinFrameInfo() {
+ const MCAsmInfo *MAI = Context.getAsmInfo();
+ if (!MAI->usesWindowsCFI())
+ report_fatal_error(".seh_* directives are not supported on this target");
if (!CurrentWinFrameInfo || CurrentWinFrameInfo->End)
report_fatal_error("No open Win64 EH frame function!");
}
void MCStreamer::EmitWinCFIStartProc(const MCSymbol *Symbol) {
+ const MCAsmInfo *MAI = Context.getAsmInfo();
+ if (!MAI->usesWindowsCFI())
+ report_fatal_error(".seh_* directives are not supported on this target");
if (CurrentWinFrameInfo && !CurrentWinFrameInfo->End)
report_fatal_error("Starting a function before ending the previous one!");