|
@@ -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");
|
|
|
}
|