16 #include "llvm/ADT/StringRef.h" 17 #include "llvm/Support/VersionTuple.h" 18 #include "llvm/Support/raw_ostream.h" 22 using namespace clang;
27 llvm::raw_string_ostream Out(Result);
56 if (dash != StringRef::npos && dash + 1 != input.size() &&
57 (input[dash+1] <
'0' || input[dash+1] >
'9')) {
58 dash = StringRef::npos;
63 StringRef runtimeName = input.substr(0, dash);
64 Version = VersionTuple(0);
65 if (runtimeName ==
"macosx") {
67 }
else if (runtimeName ==
"macosx-fragile") {
69 }
else if (runtimeName ==
"ios") {
71 }
else if (runtimeName ==
"watchos") {
73 }
else if (runtimeName ==
"gnustep") {
76 Version = VersionTuple(1, 6);
78 }
else if (runtimeName ==
"gcc") {
80 }
else if (runtimeName ==
"objfw") {
82 Version = VersionTuple(0, 8);
88 if (dash != StringRef::npos) {
89 StringRef verString = input.substr(dash + 1);
90 if (Version.tryParse(verString))
95 Version = VersionTuple(0, 8);
__SIZE_TYPE__ size_t
The unsigned integer type of the result of the sizeof operator.
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...
'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.