15 #ifndef LLVM_CLANG_BASIC_OBJCRUNTIME_H 16 #define LLVM_CLANG_BASIC_OBJCRUNTIME_H 19 #include "llvm/ADT/Triple.h" 20 #include "llvm/Support/ErrorHandling.h" 68 : TheKind(kind), Version(version) {}
83 case GCC:
return false;
86 case ObjFW:
return true;
87 case iOS:
return true;
90 llvm_unreachable(
"bad kind");
102 if (Arch == llvm::Triple::arm ||
103 Arch == llvm::Triple::x86 ||
104 Arch == llvm::Triple::x86_64)
110 return Arch != llvm::Triple::x86_64;
129 llvm_unreachable(
"bad kind");
146 case iOS:
return true;
148 case GCC:
return false;
150 case ObjFW:
return true;
152 llvm_unreachable(
"bad kind");
167 case GCC:
return false;
169 case ObjFW:
return true;
171 llvm_unreachable(
"bad kind");
217 case GCC:
return true;
219 case ObjFW:
return true;
221 llvm_unreachable(
"bad kind");
245 llvm_unreachable(
"bad kind");
263 case GCC:
return false;
265 case ObjFW:
return false;
267 llvm_unreachable(
"bad kind");
274 case iOS:
return true;
277 case GCC:
return true;
279 case ObjFW:
return true;
281 llvm_unreachable(
"bad kind");
288 case iOS:
return true;
291 case GCC:
return true;
293 case ObjFW:
return true;
295 llvm_unreachable(
"bad kind");
307 default:
return false;
357 return !(left == right);
Represents a version number in the form major[.minor[.subminor[.build]]].
const DiagnosticBuilder & operator<<(const DiagnosticBuilder &DB, const Attr *At)
bool allowsPointerArithmetic() const
Does this runtime allow pointer arithmetic on objects?
'gcc' is the Objective-C runtime shipped with GCC, implementing a fragile Objective-C ABI ...
bool hasWeakClassImport() const
Does this runtime support weakly importing classes?
'macosx-fragile' is the Apple-provided NeXT-derived runtime on Mac OS X platforms that use the fragil...
bool hasOptimizedSetter() const
Does this runtime supports optimized setter entrypoints?
bool isNonFragile() const
Does this runtime follow the set of implied behaviors for a "non-fragile" ABI?
bool isNeXTFamily() const
Is this runtime basically of the NeXT family of runtimes?
ObjCRuntime()
A bogus initialization of the runtime.
'watchos' is a variant of iOS for Apple's watchOS.
bool isFragile() const
The inverse of isNonFragile(): does this runtime follow the set of implied behaviors for a "fragile" ...
bool isSubscriptPointerArithmetic() const
Is subscripting pointer arithmetic?
bool isGNUFamily() const
Is this runtime basically of the GNU family of runtimes?
bool hasAtomicCopyHelper() const
'macosx' is the Apple-provided NeXT-derived runtime on Mac OS X platforms that use the non-fragile AB...
std::string getAsString() const
bool allowsSizeofAlignof() const
Does this runtime allow sizeof or alignof on object types?
bool tryParse(StringRef input)
Try to parse an Objective-C runtime specification from the given string.
bool hasTerminate() const
Does this runtime provide an objc_terminate function?
ObjCRuntime(Kind kind, const VersionTuple &version)
'gnustep' is the modern non-fragile GNUstep runtime.
bool hasEmptyCollections() const
Are the empty collection symbols available?
bool hasNativeWeak() const
Does this runtime natively provide ARC-compliant 'weak' entrypoints?
'objfw' is the Objective-C runtime included in ObjFW
bool hasUnwindExceptions() const
Does this runtime use zero-cost exceptions?
bool isLegacyDispatchDefaultForArch(llvm::Triple::ArchType Arch)
The default dispatch mechanism to use for the specified architecture.
const VersionTuple & getVersion() const
bool allowsARC() const
Does this runtime allow ARC at all?
Dataflow Directional Tag Classes.
The basic abstraction for the target Objective-C runtime.
friend bool operator!=(const ObjCRuntime &left, const ObjCRuntime &right)
'ios' is the Apple-provided NeXT-derived runtime on iOS or the iOS simulator; it is always non-fragil...
friend bool operator==(const ObjCRuntime &left, const ObjCRuntime &right)
unsigned kind
All of the diagnostics that can be emitted by the frontend.
Defines the clang::VersionTuple class, which represents a version in the form major[.minor[.subminor]].
bool hasARCUnsafeClaimAutoreleasedReturnValue() const
Is objc_unsafeClaimAutoreleasedReturnValue available?
bool hasNativeARC() const
Does this runtime natively provide the ARC entrypoints?
bool hasSubscripting() const
Does this runtime directly support the subscripting methods?
Kind
The basic Objective-C runtimes that we know about.
bool allowsWeak() const
Does this runtime allow the use of __weak?