diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-02-10 18:49:11 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-02-10 18:49:11 +0000 |
commit | 3241d400c86cf49e243643fdce3a408838754717 (patch) | |
tree | b94a16b52e5a74d7576a8374fc1769387ca15251 /clang/lib/Driver/ToolChains.cpp | |
parent | 535fdaf0201487ce2e7b9a1c12643bdf55173b36 (diff) | |
download | bcm5719-llvm-3241d400c86cf49e243643fdce3a408838754717.tar.gz bcm5719-llvm-3241d400c86cf49e243643fdce3a408838754717.zip |
Switch to using -fsjlj-exceptions instead of hard-coding it. Notably, this fixes
calls to the UnwindResumeOrRethrow function for C++/Obj-C exception handling,
for Darwin ARM.
llvm-svn: 95787
Diffstat (limited to 'clang/lib/Driver/ToolChains.cpp')
-rw-r--r-- | clang/lib/Driver/ToolChains.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp index a00d8d9597e..a7cd711df1b 100644 --- a/clang/lib/Driver/ToolChains.cpp +++ b/clang/lib/Driver/ToolChains.cpp @@ -640,6 +640,12 @@ bool Darwin::UseDwarfDebugFlags() const { return false; } +bool Darwin::UseSjLjExceptions() const { + // Darwin uses SjLj exceptions on ARM. + return (getTriple().getArch() == llvm::Triple::arm || + getTriple().getArch() == llvm::Triple::thumb); +} + const char *Darwin::GetDefaultRelocationModel() const { return "pic"; } |