diff options
author | Joerg Sonnenberger <joerg@bec.de> | 2015-02-23 20:23:47 +0000 |
---|---|---|
committer | Joerg Sonnenberger <joerg@bec.de> | 2015-02-23 20:23:47 +0000 |
commit | 88bf3d3c62a64a744dadbd4b1d5c151501c4805b (patch) | |
tree | 3bb6b492aed82456b1d63e0dddcb13408712be30 /lib/CodeGen/TargetInfo.h | |
parent | 8bf3730592e7e1813cff52d3bf2484f7710bc7e1 (diff) | |
download | clang-88bf3d3c62a64a744dadbd4b1d5c151501c4805b.tar.gz |
Only lower __builtin_setjmp / __builtin_longjmp to
llvm.eh.sjlj.setjmp / llvm.eh.sjlj.longjmp, if the backend is known to
support them outside the Exception Handling context. The default
handling in LLVM codegen doesn't work and will create incorrect code.
The ARM backend on the other hand will assert if the intrinsics are
used.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230255 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TargetInfo.h')
-rw-r--r-- | lib/CodeGen/TargetInfo.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CodeGen/TargetInfo.h b/lib/CodeGen/TargetInfo.h index cc469d69e3..87f13760e8 100644 --- a/lib/CodeGen/TargetInfo.h +++ b/lib/CodeGen/TargetInfo.h @@ -225,6 +225,13 @@ public: virtual unsigned getOpenMPSimdDefaultAlignment(QualType Type) const { return 0; } + + /// Control whether __builtin_longjmp / __builtin_setjmp are lowered to + /// llvm.eh.sjlj.longjmp / llvm.eh.sjlj.setjmp or the normal library + /// function. + virtual bool hasSjLjLowering(CodeGen::CodeGenFunction &CGF) const { + return false; + } }; } |