summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitb025724b46650db199da9d1c6bd6ff1ba536c54b (patch)
tree7db087e50e7019546fb77a42e3bad834fdfa2712 /llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp
parent71f96fef42fccb0fbce6a5520053289411dc2d70 (diff)
downloadbcm5719-llvm-b025724b46650db199da9d1c6bd6ff1ba536c54b.tar.gz
bcm5719-llvm-b025724b46650db199da9d1c6bd6ff1ba536c54b.zip
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. llvm-svn: 132283
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp b/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp
index a23c05ece29..8ef4587836f 100644
--- a/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud