diff options
author | David Chisnall <csdavec@swan.ac.uk> | 2013-01-11 15:33:01 +0000 |
---|---|---|
committer | David Chisnall <csdavec@swan.ac.uk> | 2013-01-11 15:33:01 +0000 |
commit | 65bd4ac6ffbf6de30cd6f36735539ff8172a904a (patch) | |
tree | dd0397563eb1d8492a5449126339d6056dd3cc8a /lib/CodeGen/CGException.cpp | |
parent | 601e6e894c2a38243588b375bed0b9a9e60060bb (diff) |
Enable the new (more C++-like, less broken) EH model when targeting the GNUstep
Objective-C runtime 1.7 or greater.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172207 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGException.cpp')
-rw-r--r-- | lib/CodeGen/CGException.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/CGException.cpp b/lib/CodeGen/CGException.cpp index 5797fd7578..b30d820a92 100644 --- a/lib/CodeGen/CGException.cpp +++ b/lib/CodeGen/CGException.cpp @@ -156,6 +156,7 @@ namespace { static const EHPersonality GNU_C; static const EHPersonality GNU_C_SJLJ; static const EHPersonality GNU_ObjC; + static const EHPersonality GNUstep_ObjC; static const EHPersonality GNU_ObjCXX; static const EHPersonality NeXT_ObjC; static const EHPersonality GNU_CPlusPlus; @@ -173,6 +174,8 @@ const EHPersonality EHPersonality::GNU_ObjC = {"__gnu_objc_personality_v0", "objc_exception_throw"}; const EHPersonality EHPersonality::GNU_ObjCXX = { "__gnustep_objcxx_personality_v0", 0 }; +const EHPersonality +EHPersonality::GNUstep_ObjC = { "__gnustep_objc_personality_v0", 0 }; static const EHPersonality &getCPersonality(const LangOptions &L) { if (L.SjLjExceptions) @@ -188,6 +191,9 @@ static const EHPersonality &getObjCPersonality(const LangOptions &L) { case ObjCRuntime::iOS: return EHPersonality::NeXT_ObjC; case ObjCRuntime::GNUstep: + if (L.ObjCRuntime.getVersion() >= VersionTuple(1, 7)) + return EHPersonality::GNUstep_ObjC; + // fallthrough case ObjCRuntime::GCC: case ObjCRuntime::ObjFW: return EHPersonality::GNU_ObjC; |