22void ScalarTraits<FlowStringRef>::output(
const FlowStringRef &
Value,
void *Ctx,
24 ScalarTraits<StringRef>::output(
Value, Ctx,
OS);
28 return ScalarTraits<StringRef>::input(
Value, Ctx, Out.value);
31 return ScalarTraits<StringRef>::mustQuote(
Name);
34void ScalarEnumerationTraits<ObjCConstraintType>::enumeration(
36 IO.enumCase(Constraint,
"none", ObjCConstraintType::None);
37 IO.enumCase(Constraint,
"retain_release", ObjCConstraintType::Retain_Release);
38 IO.enumCase(Constraint,
"retain_release_for_simulator",
39 ObjCConstraintType::Retain_Release_For_Simulator);
40 IO.enumCase(Constraint,
"retain_release_or_gc",
41 ObjCConstraintType::Retain_Release_Or_GC);
42 IO.enumCase(Constraint,
"gc", ObjCConstraintType::GC);
45void ScalarTraits<PlatformSet>::output(
const PlatformSet &Values,
void *IO,
49 assert((!Ctx || Ctx->FileKind != FileType::Invalid) &&
50 "File type is not set in context");
52 if (Ctx && Ctx->FileKind ==
TBD_V3 && Values.
count(PLATFORM_MACOS) &&
53 Values.
count(PLATFORM_MACCATALYST)) {
59 switch (*Values.
begin()) {
66 case PLATFORM_IOSSIMULATOR:
71 case PLATFORM_WATCHOSSIMULATOR:
73 case PLATFORM_WATCHOS:
76 case PLATFORM_TVOSSIMULATOR:
81 case PLATFORM_BRIDGEOS:
84 case PLATFORM_MACCATALYST:
87 case PLATFORM_DRIVERKIT:
96 assert((!Ctx || Ctx->FileKind != FileType::Invalid) &&
97 "File type is not set in context");
99 if (Scalar ==
"zippered") {
100 if (Ctx && Ctx->FileKind == FileType::TBD_V3) {
101 Values.
insert(PLATFORM_MACOS);
102 Values.
insert(PLATFORM_MACCATALYST);
105 return "invalid platform";
109 .
Case(
"macosx", PLATFORM_MACOS)
110 .
Case(
"ios", PLATFORM_IOS)
111 .
Case(
"watchos", PLATFORM_WATCHOS)
112 .
Case(
"tvos", PLATFORM_TVOS)
113 .
Case(
"bridgeos", PLATFORM_BRIDGEOS)
114 .
Case(
"iosmac", PLATFORM_MACCATALYST)
115 .
Case(
"maccatalyst", PLATFORM_MACCATALYST)
116 .
Case(
"driverkit", PLATFORM_DRIVERKIT)
119 if (Platform == PLATFORM_MACCATALYST)
120 if (Ctx && Ctx->FileKind != FileType::TBD_V3)
121 return "invalid platform";
123 if (Platform == PLATFORM_UNKNOWN)
124 return "unknown platform";
130QuotingType ScalarTraits<PlatformSet>::mustQuote(
StringRef) {
131 return QuotingType::None;
134void ScalarBitSetTraits<ArchitectureSet>::bitset(IO &IO,
136#define ARCHINFO(arch, type, subtype, numbits) \
137 IO.bitSetCase(Archs, #arch, 1U << static_cast<int>(AK_##arch));
138#include "llvm/TextAPI/Architecture.def"
151QuotingType ScalarTraits<Architecture>::mustQuote(
StringRef) {
152 return QuotingType::None;
161 if (!
Value.parse32(Scalar))
162 return "invalid packed version string.";
165QuotingType ScalarTraits<PackedVersion>::mustQuote(
StringRef) {
166 return QuotingType::None;
169void ScalarTraits<SwiftVersion>::output(
const SwiftVersion &
Value,
void *,
190 SwiftVersion &
Value) {
192 assert((!Ctx || Ctx->FileKind != FileType::Invalid) &&
193 "File type is not set in context");
195 if (Ctx->FileKind == FileType::TBD_V4) {
196 if (Scalar.getAsInteger(10,
Value))
197 return "invalid Swift ABI version.";
208 if (
Value != SwiftVersion(0))
211 if (Scalar.getAsInteger(10,
Value))
212 return "invalid Swift ABI version.";
216QuotingType ScalarTraits<SwiftVersion>::mustQuote(
StringRef) {
217 return QuotingType::None;
228 return QuotingType::Single;
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file implements the StringSwitch template, which mimics a switch() statement whose cases are str...
std::pair< llvm::MachO::Target, std::string > UUID
SmallSet - This maintains a set of unique values, optimizing for the case when the set is small (less...
const_iterator begin() const
size_type count(const T &V) const
count - Return 1 if the element is in the set, 0 otherwise.
std::pair< const_iterator, bool > insert(const T &V)
insert - Insert an element into the set if it isn't already there.
StringRef - Represent a constant reference to a string, i.e.
A switch()-like statement whose cases are string literals.
StringSwitch & Case(StringLiteral S, T Value)
LLVM Value Representation.
This class implements an extremely fast bulk output stream that can only output to a stream.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Architecture getArchitectureFromName(StringRef Name)
Convert a name to an architecture slice.
@ TBD_V3
Text-based stub file (.tbd) version 3.0.
ObjCConstraintType
Defines a list of Objective-C constraints.
Architecture
Defines the architecture slices that are supported by Text-based Stub files.
This is an optimization pass for GlobalISel generic memory operations.