15 #include "llvm/ADT/StringRef.h" 16 #include "llvm/Support/VersionTuple.h" 17 #include "llvm/Support/raw_ostream.h" 21 using namespace clang;
26 llvm::raw_string_ostream Out(Result);
55 if (dash != StringRef::npos && dash + 1 != input.size() &&
56 (input[dash+1] <
'0' || input[dash+1] >
'9')) {
57 dash = StringRef::npos;
62 StringRef runtimeName = input.substr(0, dash);
63 Version = VersionTuple(0);
64 if (runtimeName ==
"macosx") {
66 }
else if (runtimeName ==
"macosx-fragile") {
68 }
else if (runtimeName ==
"ios") {
70 }
else if (runtimeName ==
"watchos") {
72 }
else if (runtimeName ==
"gnustep") {
75 Version = VersionTuple(1, 6);
77 }
else if (runtimeName ==
"gcc") {
79 }
else if (runtimeName ==
"objfw") {
81 Version = VersionTuple(0, 8);
87 if (dash != StringRef::npos) {
88 StringRef verString = input.substr(dash + 1);
89 if (Version.tryParse(verString))
94 Version = VersionTuple(0, 8);
Defines types useful for describing an Objective-C runtime.
const DiagnosticBuilder & operator<<(const DiagnosticBuilder &DB, const Attr *At)
'gcc' is the Objective-C runtime shipped with GCC, implementing a fragile Objective-C ABI ...
'macosx-fragile' is the Apple-provided NeXT-derived runtime on Mac OS X platforms that use the fragil...
__SIZE_TYPE__ size_t
The unsigned integer type of the result of the sizeof operator.
'watchos' is a variant of iOS for Apple's watchOS.
'macosx' is the Apple-provided NeXT-derived runtime on Mac OS X platforms that use the non-fragile AB...
std::string getAsString() const
bool tryParse(StringRef input)
Try to parse an Objective-C runtime specification from the given string.
The result type of a method or function.
'gnustep' is the modern non-fragile GNUstep runtime.
'objfw' is the Objective-C runtime included in ObjFW
const VersionTuple & getVersion() const
Dataflow Directional Tag Classes.
The basic abstraction for the target Objective-C runtime.
'ios' is the Apple-provided NeXT-derived runtime on iOS or the iOS simulator; it is always non-fragil...
unsigned kind
All of the diagnostics that can be emitted by the frontend.
Kind
The basic Objective-C runtimes that we know about.