summaryrefslogtreecommitdiff
path: root/lib/Target/TargetMachine.cpp
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
commit1b747ad8a0694b86e8d98a8b9a05ddfe74ec0cd3 (patch)
tree55ef4dc73ff823568dc8543cbb1b4cfa77191b0b /lib/Target/TargetMachine.cpp
parent3a1f0f6785e27eb8ede455a3583ca8c885d3911e (diff)
downloadllvm-1b747ad8a0694b86e8d98a8b9a05ddfe74ec0cd3.tar.gz
llvm-1b747ad8a0694b86e8d98a8b9a05ddfe74ec0cd3.tar.bz2
llvm-1b747ad8a0694b86e8d98a8b9a05ddfe74ec0cd3.tar.xz
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 'lib/Target/TargetMachine.cpp')
-rw-r--r--lib/Target/TargetMachine.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/Target/TargetMachine.cpp b/lib/Target/TargetMachine.cpp
index fb95c52a99..b94fa68be9 100644
--- a/lib/Target/TargetMachine.cpp
+++ b/lib/Target/TargetMachine.cpp
@@ -33,7 +33,8 @@ namespace llvm {
FloatABI::ABIType FloatABIType;
bool NoImplicitFloat;
bool NoZerosInBSS;
- bool ExceptionHandling;
+ bool DwarfExceptionHandling;
+ bool SjLjExceptionHandling;
bool UnwindTablesMandatory;
Reloc::Model RelocationModel;
CodeModel::Model CMModel;
@@ -104,9 +105,14 @@ DontPlaceZerosInBSS("nozero-initialized-in-bss",
cl::location(NoZerosInBSS),
cl::init(false));
static cl::opt<bool, true>
-EnableExceptionHandling("enable-eh",
+EnableDwarfExceptionHandling("enable-eh",
cl::desc("Emit DWARF exception handling (default if target supports)"),
- cl::location(ExceptionHandling),
+ cl::location(DwarfExceptionHandling),
+ cl::init(false));
+static cl::opt<bool, true>
+EnableSjLjExceptionHandling("enable-sjlj-eh",
+ cl::desc("Emit SJLJ exception handling (default if target supports)"),
+ cl::location(SjLjExceptionHandling),
cl::init(false));
static cl::opt<bool, true>
EnableUnwindTables("unwind-tables",