15 #include "llvm/Support/raw_ostream.h"
17 using namespace clang;
22 llvm::raw_string_ostream Out(Result);
50 if (dash != StringRef::npos && dash + 1 != input.size() &&
51 (input[dash+1] <
'0' || input[dash+1] >
'9')) {
52 dash = StringRef::npos;
57 StringRef runtimeName = input.substr(0, dash);
59 if (runtimeName ==
"macosx") {
61 }
else if (runtimeName ==
"macosx-fragile") {
63 }
else if (runtimeName ==
"ios") {
65 }
else if (runtimeName ==
"gnustep") {
70 }
else if (runtimeName ==
"gcc") {
72 }
else if (runtimeName ==
"objfw") {
80 if (dash != StringRef::npos) {
81 StringRef verString = input.substr(dash + 1);
Represents a version number in the form major[.minor[.subminor[.build]]].
Defines types useful for describing an Objective-C runtime.
const DiagnosticBuilder & operator<<(const DiagnosticBuilder &DB, const Attr *At)
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.
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.