aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/Win64Exception.cpp
diff options
context:
space:
mode:
authorCharles Davis <cdavis@mines.edu>2011-05-29 04:28:35 +0000
committerCharles Davis <cdavis@mines.edu>2011-05-29 04:28:35 +0000
commit12e3349de9a13e133d8a59ce4c517a8e95bd91c3 (patch)
tree467b8673fa211f96919650975c4766c950165926 /lib/CodeGen/AsmPrinter/Win64Exception.cpp
parent04507f062f5d61a298d82497db71eff0951b896c (diff)
When generating against the Win64 EH scheme, set the handler to the GCC-specific
handler. At this moment, only GCC-style exceptions are supported. Other kinds of exceptions, including "traditional" SEH and Microsoft Visual C++ exceptions, need more work--and an compiler exception model that isn't specific to GCC-style exceptions! In particular, I imagine that it would be possible to mix "traditional" SEH with GCC-style EH or Microsoft C++ EH. Currently LLVM has no way (beyond some target-specific defaults and whole-module compiler switches) of knowing which scheme to use when. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132283 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/Win64Exception.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/Win64Exception.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/Win64Exception.cpp b/lib/CodeGen/AsmPrinter/Win64Exception.cpp
index a23c05ece2..8ef4587836 100644
--- a/lib/CodeGen/AsmPrinter/Win64Exception.cpp
+++ b/lib/CodeGen/AsmPrinter/Win64Exception.cpp
@@ -76,6 +76,13 @@ void Win64Exception::BeginFunction(const MachineFunction *MF) {
return;
Asm->OutStreamer.EmitWin64EHStartProc(Asm->CurrentFnSym);
+
+ if (!shouldEmitPersonality)
+ return;
+
+ MCSymbol *GCCHandlerSym =
+ Asm->GetExternalSymbolSymbol("_GCC_specific_handler");
+ Asm->OutStreamer.EmitWin64EHHandler(GCCHandlerSym, true, true);
}
/// EndFunction - Gather and emit post-function exception information.