15 #include "llvm/Support/raw_ostream.h"
17 using namespace clang;
22 llvm::raw_string_ostream Out(Result);
51 if (dash != StringRef::npos && dash + 1 != input.size() &&
52 (input[dash+1] <
'0' || input[dash+1] >
'9')) {
53 dash = StringRef::npos;
58 StringRef runtimeName = input.substr(0, dash);
60 if (runtimeName ==
"macosx") {
62 }
else if (runtimeName ==
"macosx-fragile") {
64 }
else if (runtimeName ==
"ios") {
66 }
else if (runtimeName ==
"watchos") {
68 }
else if (runtimeName ==
"gnustep") {
73 }
else if (runtimeName ==
"gcc") {
75 }
else if (runtimeName ==
"objfw") {
83 if (dash != StringRef::npos) {
84 StringRef verString = input.substr(dash + 1);
Represents a version number in the form major[.minor[.subminor[.build]]].
__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...
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
bool tryParse(StringRef string)
Try to parse the given string as a version number.
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.
std::string getAsString() const
Kind
The basic Objective-C runtimes that we know about.