diff options
| author | Martin Storsjo <martin@martin.st> | 2017-09-28 19:04:14 +0000 |
|---|---|---|
| committer | Martin Storsjo <martin@martin.st> | 2017-09-28 19:04:14 +0000 |
| commit | adceba59a2d6a0f083d02c6212a84b7b6aec206c (patch) | |
| tree | af008f6cfd806cc8ba35f5182c12633ba74a0d82 /llvm/lib/Target | |
| parent | 5c3e8a450e2fdb4b8eadd93309c4b278040de9e6 (diff) | |
| download | bcm5719-llvm-adceba59a2d6a0f083d02c6212a84b7b6aec206c.tar.gz bcm5719-llvm-adceba59a2d6a0f083d02c6212a84b7b6aec206c.zip | |
[ARM] Fix SJLJ exception handling when manually chosen on a platform where it isn't default
Differential Revision: https://reviews.llvm.org/D38252
llvm-svn: 314450
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/ARM/ARMSubtarget.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARMSubtarget.cpp b/llvm/lib/Target/ARM/ARMSubtarget.cpp index e440957269f..a8546ec40a6 100644 --- a/llvm/lib/Target/ARM/ARMSubtarget.cpp +++ b/llvm/lib/Target/ARM/ARMSubtarget.cpp @@ -150,7 +150,9 @@ void ARMSubtarget::initializeEnvironment() { // MCAsmInfo isn't always present (e.g. in opt) so we can't initialize this // directly from it, but we can try to make sure they're consistent when both // available. - UseSjLjEH = isTargetDarwin() && !isTargetWatchABI(); + UseSjLjEH = (isTargetDarwin() && !isTargetWatchABI() && + Options.ExceptionModel == ExceptionHandling::None) || + Options.ExceptionModel == ExceptionHandling::SjLj; assert((!TM.getMCAsmInfo() || (TM.getMCAsmInfo()->getExceptionHandlingType() == ExceptionHandling::SjLj) == UseSjLjEH) && |

