aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lto
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2009-08-11 00:09:57 +0000
committerJim Grosbach <grosbach@apple.com>2009-08-11 00:09:57 +0000
commit29feb6a583204de0948def1d59d186e4b837ef52 (patch)
tree55ef4dc73ff823568dc8543cbb1b4cfa77191b0b /tools/lto
parent02f6f9f1055d0a0abf5d14eaeeddcaf3f65be0ab (diff)
downloadexternal_llvm-29feb6a583204de0948def1d59d186e4b837ef52.zip
external_llvm-29feb6a583204de0948def1d59d186e4b837ef52.tar.gz
external_llvm-29feb6a583204de0948def1d59d186e4b837ef52.tar.bz2
SjLj based exception handling unwinding support. This patch is nasty, brutish
and short. Well, it's kinda short. Definitely nasty and brutish. The front-end generates the register/unregister calls into the SjLj runtime, call-site indices and landing pad dispatch. The back end fills in the LSDA with the call-site information provided by the front end. Catch blocks are not yet implemented. Built on Darwin and verified no llvm-core "make check" regressions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78625 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lto')
-rw-r--r--tools/lto/LTOCodeGenerator.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/tools/lto/LTOCodeGenerator.cpp b/tools/lto/LTOCodeGenerator.cpp
index 598da7f..dacf483 100644
--- a/tools/lto/LTOCodeGenerator.cpp
+++ b/tools/lto/LTOCodeGenerator.cpp
@@ -394,9 +394,19 @@ bool LTOCodeGenerator::generateAssemblyCode(formatted_raw_ostream& out,
Module* mergedModule = _linker.getModule();
- // If target supports exception handling then enable it now.
- if ( _target->getTargetAsmInfo()->doesSupportExceptionHandling() )
- llvm::ExceptionHandling = true;
+ // If target supports exception handling then enable it now.
+ switch (_target->getTargetAsmInfo()->getExceptionHandlingType()) {
+ case ExceptionHandling::Dwarf:
+ llvm::DwarfExceptionHandling = true;
+ break;
+ case ExceptionHandling::SjLj:
+ llvm::SjLjExceptionHandling = true;
+ break;
+ case ExceptionHandling::None:
+ break;
+ default:
+ assert (0 && "Unknown exception handling model!");
+ }
// if options were requested, set them
if ( !_codegenOptions.empty() )