diff options
author | David Chisnall <csdavec@swan.ac.uk> | 2012-07-03 20:49:52 +0000 |
---|---|---|
committer | David Chisnall <csdavec@swan.ac.uk> | 2012-07-03 20:49:52 +0000 |
commit | 11d3f4cc27e6b923fc32481dc1bb5ec46c7d1f4b (patch) | |
tree | 555a41fbf7a33a4b636adedd17cfbacf1b3bfdc8 /include/clang/Basic/ObjCRuntime.h | |
parent | 1fc6e4fa79444b2a7be8a1150f646ffbde68b744 (diff) |
Rename the GCC Objective-C runtime to gcc from gnu-fragile and the GNUstep
runtime to gnustep from gnu. Fix EH for the GCC runtime.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159684 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/ObjCRuntime.h')
-rw-r--r-- | include/clang/Basic/ObjCRuntime.h | 46 |
1 files changed, 29 insertions, 17 deletions
diff --git a/include/clang/Basic/ObjCRuntime.h b/include/clang/Basic/ObjCRuntime.h index 1be3b142c3..9212a8bf95 100644 --- a/include/clang/Basic/ObjCRuntime.h +++ b/include/clang/Basic/ObjCRuntime.h @@ -40,11 +40,12 @@ public: /// version of iOS. iOS, - /// 'gnu' is the non-fragile GNU runtime. - GNU, + /// 'gcc' is the Objective-C runtime shipped with GCC, implementing a + /// fragile Objective-C ABI + GCC, - /// 'gnu-fragile' is the fragile GNU runtime. - FragileGNU + /// 'gnustep' is the modern non-fragile GNUstep runtime. + GNUstep }; private: @@ -71,9 +72,9 @@ public: bool isNonFragile() const { switch (getKind()) { case FragileMacOSX: return false; - case FragileGNU: return false; + case GCC: return false; case MacOSX: return true; - case GNU: return true; + case GNUstep: return true; case iOS: return true; } llvm_unreachable("bad kind"); @@ -83,15 +84,15 @@ public: /// implied behaviors for a "fragile" ABI? bool isFragile() const { return !isNonFragile(); } - /// \brief Is this runtime basically of the GNU family of runtimes? + /// \brief Is this runtime basically of the GNUstep family of runtimes? bool isGNUFamily() const { switch (getKind()) { case FragileMacOSX: case MacOSX: case iOS: return false; - case FragileGNU: - case GNU: + case GCC: + case GNUstep: return true; } llvm_unreachable("bad kind"); @@ -118,8 +119,8 @@ public: // This is really a lie, because some implementations and versions // of the runtime do not support ARC. Probably -fgnu-runtime // should imply a "maximal" runtime or something? - case FragileGNU: return true; - case GNU: return true; + case GCC: return true; + case GNUstep: return true; } llvm_unreachable("bad kind"); } @@ -143,8 +144,8 @@ public: // This is really a lie, because some implementations and versions // of the runtime do not support ARC. Probably -fgnu-runtime // should imply a "maximal" runtime or something? - case FragileGNU: return true; - case GNU: return true; + case GCC: return true; + case GNUstep: return true; } llvm_unreachable("bad kind"); } @@ -158,8 +159,8 @@ public: case FragileMacOSX: return getVersion() >= VersionTuple(10, 8); case MacOSX: return getVersion() >= VersionTuple(10, 8); case iOS: return getVersion() >= VersionTuple(5); - case FragileGNU: return false; - case GNU: return false; + case GCC: return false; + case GNUstep: return false; } llvm_unreachable("bad kind"); } @@ -170,8 +171,19 @@ public: case MacOSX: return true; case iOS: return true; case FragileMacOSX: return false; - case FragileGNU: return false; - case GNU: return false; + case GCC: return true; + case GNUstep: return true; + } + llvm_unreachable("bad kind"); + } + /// \brief Does this runtime use zero-cost exceptions? + bool hasUnwindExceptions() const { + switch (getKind()) { + case MacOSX: return true; + case iOS: return true; + case FragileMacOSX: return false; + case GCC: return true; + case GNUstep: return true; } llvm_unreachable("bad kind"); } |