LLVM: lib/TextAPI/TextStub.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

28#include

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

136

137

138

139

140

141

142

143

144

145

146

147

148

149

150

151

152

153

154

155

156

157

158

159

160

161

162

163

164

165

166

167

168

169

170

171

172

173

174

175

176

177

178

179

180

181

182

183

184

185

186

187

188

189

190

191

192

193

194

195

196

197

198

199

200

201

202

203using namespace llvm;

206

207namespace {

208struct ExportSection {

209 std::vector Architectures;

210 std::vector AllowableClients;

211 std::vector ReexportedLibraries;

212 std::vector Symbols;

213 std::vector Classes;

214 std::vector ClassEHs;

215 std::vector IVars;

216 std::vector WeakDefSymbols;

217 std::vector TLVSymbols;

218};

219

220struct UndefinedSection {

221 std::vector Architectures;

222 std::vector Symbols;

223 std::vector Classes;

224 std::vector ClassEHs;

225 std::vector IVars;

226 std::vector WeakRefSymbols;

227};

228

229

230struct SymbolSection {

232 std::vector Symbols;

233 std::vector Classes;

234 std::vector ClassEHs;

235 std::vector Ivars;

236 std::vector WeakSymbols;

237 std::vector TlvSymbols;

238};

239

240struct MetadataSection {

241 enum Option { Clients, Libraries };

242 std::vector Targets;

243 std::vector Values;

244};

245

246struct UmbrellaSection {

247 std::vector Targets;

248 std::string Umbrella;

249};

250

251

252struct UUIDv4 {

254 std::string Value;

255

256 UUIDv4() = default;

257 UUIDv4(const Target &TargetID, const std::string &Value)

258 : TargetID(TargetID), Value(Value) {}

259};

260}

261

265

271

272namespace llvm {

273namespace yaml {

274

276 static void mapping(IO &IO, ExportSection &Section) {

279 "File type is not set in YAML context");

280

283 IO.mapOptional("allowed-clients", Section.AllowableClients);

284 else

285 IO.mapOptional("allowable-clients", Section.AllowableClients);

286 IO.mapOptional("re-exports", Section.ReexportedLibraries);

290 IO.mapOptional("objc-eh-types", Section.ClassEHs);

292 IO.mapOptional("weak-def-symbols", Section.WeakDefSymbols);

293 IO.mapOptional("thread-local-symbols", Section.TLVSymbols);

294 }

295};

296

298 static void mapping(IO &IO, UndefinedSection &Section) {

301 "File type is not set in YAML context");

302

307 IO.mapOptional("objc-eh-types", Section.ClassEHs);

309 IO.mapOptional("weak-ref-symbols", Section.WeakRefSymbols);

310 }

311};

312

324

331

338

339template <>

341 static void mapping(IO &IO, MetadataSection &Section,

342 MetadataSection::Option &OptionKind) {

344 switch (OptionKind) {

345 case MetadataSection::Option::Clients:

347 return;

348 case MetadataSection::Option::Libraries:

350 return;

351 }

353 }

354};

355

366

369 OS << Value.Arch << "-";

370 switch (Value.Platform) {

371#define PLATFORM(platform, id, name, build_name, target, tapi_target, \

372 marketing) \

373 case PLATFORM_##platform: \

374 OS << #tapi_target; \

375 break;

376#include "llvm/BinaryFormat/MachO.def"

377 }

378 }

379

382 if (!Result) {

384 return "unparsable target";

385 }

386

389 return "unknown architecture";

390 if (Value.Platform == PLATFORM_UNKNOWN)

391 return "unknown platform";

392

393 return {};

394 }

395

397};

398

404 Platforms = File->getPlatforms();

410

412 if (!File->isApplicationExtensionSafe())

414

415 if (!File->isTwoLevelNamespace())

417

418 if (!File->umbrellas().empty())

420

421 std::set ArchSet;

422 for (const auto &Library : File->allowableClients())

423 ArchSet.insert(Library.getArchitectures());

424

425 for (const auto &Library : File->reexportedLibraries())

426 ArchSet.insert(Library.getArchitectures());

427

428 std::map<const Symbol *, ArchitectureSet> SymbolToArchSet;

429 for (const auto *Symbol : File->symbols()) {

433 }

434

436 ExportSection Section;

438

439 for (const auto &Library : File->allowableClients())

441 Section.AllowableClients.emplace_back(Library.getInstallName());

442

443 for (const auto &Library : File->reexportedLibraries())

445 Section.ReexportedLibraries.emplace_back(Library.getInstallName());

446

447 for (const auto &SymArch : SymbolToArchSet) {

449 continue;

450

451 const auto *Symbol = SymArch.first;

455 Section.WeakDefSymbols.emplace_back(Symbol->getName());

457 Section.TLVSymbols.emplace_back(Symbol->getName());

458 else

460 break;

463 Section.Classes.emplace_back(

465 else

467 break;

470 Section.Symbols.emplace_back(

472 else

473 Section.ClassEHs.emplace_back(Symbol->getName());

474 break;

477 Section.IVars.emplace_back(

479 else

481 break;

482 }

483 }

490 Exports.emplace_back(std::move(Section));

491 }

492

493 ArchSet.clear();

494 SymbolToArchSet.clear();

495

496 for (const auto *Symbol : File->undefineds()) {

500 }

501

503 UndefinedSection Section;

505

506 for (const auto &SymArch : SymbolToArchSet) {

508 continue;

509

510 const auto *Symbol = SymArch.first;

514 Section.WeakRefSymbols.emplace_back(Symbol->getName());

515 else

517 break;

520 Section.Classes.emplace_back(

522 else

524 break;

527 Section.Symbols.emplace_back(

529 else

530 Section.ClassEHs.emplace_back(Symbol->getName());

531 break;

534 Section.IVars.emplace_back(

536 else

538 break;

539 }

540 }

546 Undefineds.emplace_back(std::move(Section));

547 }

548 }

549

550

551

552

553

554

558

559 for (auto Platform : Platforms) {

561

563 if ((Architecture == AK_i386) && (Platform == PLATFORM_MACCATALYST))

564 continue;

565

567 }

568 }

569 return Targets;

570 }

571

575

577 File->setPath(Ctx->Path);

578 File->setFileType(Ctx->FileKind);

585 for (const auto &Target : File->targets())

587

589 File->setTwoLevelNamespace();

590 File->setApplicationExtensionSafe();

591 } else {

593 File->setApplicationExtensionSafe(

595 }

596

597

598

599

601

602 for (const auto &Section : Exports) {

603 const auto Targets =

605

606 for (const auto &Lib : Section.AllowableClients)

607 for (const auto &Target : Targets)

608 File->addAllowableClient(Lib, Target);

609

610 for (const auto &Lib : Section.ReexportedLibraries)

611 for (const auto &Target : Targets)

612 File->addReexportedLibrary(Lib, Target);

613

614 for (const auto &Symbol : Section.Symbols) {

618 Symbol.value.drop_front(15), Targets, Flags);

619 else

621 }

622 for (auto &Symbol : Section.Classes) {

623 auto Name = Symbol.value;

625 Name = Name.drop_front();

627 }

628 for (auto &Symbol : Section.ClassEHs)

631 for (auto &Symbol : Section.IVars) {

632 auto Name = Symbol.value;

634 Name = Name.drop_front();

637 }

638 for (auto &Symbol : Section.WeakDefSymbols)

641 for (auto &Symbol : Section.TLVSymbols)

644 }

645

646 for (const auto &Section : Undefineds) {

647 const auto Targets =

649 for (auto &Symbol : Section.Symbols) {

653 Symbol.value.drop_front(15), Targets,

655 else

658 }

659 for (auto &Symbol : Section.Classes) {

660 auto Name = Symbol.value;

662 Name = Name.drop_front();

665 }

666 for (auto &Symbol : Section.ClassEHs)

669 for (auto &Symbol : Section.IVars) {

670 auto Name = Symbol.value;

672 Name = Name.drop_front();

675 }

676 for (auto &Symbol : Section.WeakRefSymbols)

680 }

681

682 return File;

683 }

684

688 return {};

689

692 return StringRef(reinterpret_cast<const char *>(Ptr), String.size());

693 }

694

707 };

708

710 if (IO.mapTag("!tapi-tbd", false))

712 else if (IO.mapTag("!tapi-tbd-v3", false))

714 else if (IO.mapTag("!tapi-tbd-v2", false))

716 else if (IO.mapTag("!tapi-tbd-v1", false) ||

717 IO.mapTag("tag:yaml.org,2002:map", false))

719 else {

721 return;

722 }

723 }

724

729 "File type is not set in YAML context");

730

733 switch (Ctx->FileKind) {

734 default:

735 break;

738 return;

740 IO.setError("unsupported file type");

741 return;

742 }

743 } else {

744

745 switch (Ctx->FileKind) {

746 default:

750 return;

752 IO.mapTag("!tapi-tbd-v3", true);

753 break;

755 IO.mapTag("!tapi-tbd-v2", true);

756 break;

758

759 break;

760 }

761 }

763 }

764

772 Targets.insert(Targets.begin(), File->targets().begin(),

773 File->targets().end());

778

780 if (!File->isApplicationExtensionSafe())

782

783 if (!File->isTwoLevelNamespace())

785

786 if (File->isOSLibNotForSharedCache())

788

789 {

790 std::map<std::string, TargetList> valueToTargetList;

791 for (const auto &it : File->umbrellas())

792 valueToTargetList[it.second].emplace_back(it.first);

793

794 for (const auto &it : valueToTargetList) {

795 UmbrellaSection CurrentSection;

796 CurrentSection.Targets.insert(CurrentSection.Targets.begin(),

797 it.second.begin(), it.second.end());

798 CurrentSection.Umbrella = it.first;

800 }

801 }

802

803 assignTargetsToLibrary(File->allowableClients(), AllowableClients);

804 assignTargetsToLibrary(File->reexportedLibraries(), ReexportedLibraries);

805

806 auto handleSymbols =

809 std::set TargetSet;

810 std::map<const Symbol *, TargetList> SymbolToTargetList;

811 for (const auto *Symbol : Symbols) {

814 TargetSet.emplace(std::move(Targets));

815 }

816 for (const auto &TargetIDs : TargetSet) {

817 SymbolSection CurrentSection;

818 CurrentSection.Targets.insert(CurrentSection.Targets.begin(),

819 TargetIDs.begin(), TargetIDs.end());

820

821 for (const auto &IT : SymbolToTargetList) {

822 if (IT.second != TargetIDs)

823 continue;

824

825 const auto *Symbol = IT.first;

829 CurrentSection.WeakSymbols.emplace_back(Symbol->getName());

831 CurrentSection.TlvSymbols.emplace_back(Symbol->getName());

832 else

833 CurrentSection.Symbols.emplace_back(Symbol->getName());

834 break;

836 CurrentSection.Classes.emplace_back(Symbol->getName());

837 break;

839 CurrentSection.ClassEHs.emplace_back(Symbol->getName());

840 break;

842 CurrentSection.Ivars.emplace_back(Symbol->getName());

843 break;

844 }

845 }

846 sort(CurrentSection.Symbols);

847 sort(CurrentSection.Classes);

848 sort(CurrentSection.ClassEHs);

849 sort(CurrentSection.Ivars);

850 sort(CurrentSection.WeakSymbols);

851 sort(CurrentSection.TlvSymbols);

852 CurrentSections.emplace_back(std::move(CurrentSection));

853 }

854 };

855

856 handleSymbols(Exports, File->exports());

857 handleSymbols(Reexports, File->reexports());

858 handleSymbols(Undefineds, File->undefineds());

859 }

860

864

866 File->setPath(Ctx->Path);

867 File->setFileType(Ctx->FileKind);

868 File->addTargets(Targets);

874 for (const auto &target : CurrentSection.Targets)

875 File->addParentUmbrella(target, CurrentSection.Umbrella);

877 File->setApplicationExtensionSafe(

879 File->setOSLibNotForSharedCache(

881

883 for (const auto &lib : CurrentSection.Values)

884 for (const auto &Target : CurrentSection.Targets)

885 File->addAllowableClient(lib, Target);

886 }

887

889 for (const auto &Lib : CurrentSection.Values)

890 for (const auto &Target : CurrentSection.Targets)

891 File->addReexportedLibrary(Lib, Target);

892 }

893

894 auto handleSymbols = [File](const SectionList &CurrentSections,

896

897

898

900

901 for (const auto &CurrentSection : CurrentSections) {

902 for (auto &sym : CurrentSection.Symbols)

904 CurrentSection.Targets, Flag);

905

906 for (auto &sym : CurrentSection.Classes)

908 CurrentSection.Targets, Flag);

909

910 for (auto &sym : CurrentSection.ClassEHs)

912 CurrentSection.Targets, Flag);

913

914 for (auto &sym : CurrentSection.Ivars)

916 CurrentSection.Targets, Flag);

917

922 for (auto &sym : CurrentSection.WeakSymbols) {

924 CurrentSection.Targets, Flag | SymFlag);

925 }

926

927 for (auto &sym : CurrentSection.TlvSymbols)

929 CurrentSection.Targets,

931 }

932 };

933

937

938 return File;

939 }

940

955

956 private:

957 void assignTargetsToLibrary(const std::vector &Libraries,

958 std::vector &Section) {

959 std::set targetSet;

960 std::map<const InterfaceFileRef *, TargetList> valueToTargetList;

961 for (const auto &library : Libraries) {

963 valueToTargetList[&library] = targets;

964 targetSet.emplace(std::move(targets));

965 }

966

967 for (const auto &targets : targetSet) {

968 MetadataSection CurrentSection;

969 CurrentSection.Targets.insert(CurrentSection.Targets.begin(),

970 targets.begin(), targets.end());

971

972 for (const auto &it : valueToTargetList) {

973 if (it.second != targets)

974 continue;

975

976 CurrentSection.Values.emplace_back(it.first->getInstallName());

977 }

979 Section.emplace_back(std::move(CurrentSection));

980 }

981 }

982 };

983

987 std::vector EmptyUUID;

994 IO.mapRequired("install-name", Keys->InstallName);

995 IO.mapOptional("current-version", Keys->CurrentVersion,

997 IO.mapOptional("compatibility-version", Keys->CompatibilityVersion,

1000 IO.mapOptional("swift-version", Keys->SwiftABIVersion, SwiftVersion(0));

1001 else

1002 IO.mapOptional("swift-abi-version", Keys->SwiftABIVersion,

1003 SwiftVersion(0));

1004 IO.mapOptional("objc-constraint", Keys->ObjCConstraint,

1013 }

1014

1017 File);

1018 std::vector EmptyUUID;

1019 IO.mapTag("!tapi-tbd", true);

1020 IO.mapRequired("tbd-version", Keys->TBDVersion);

1024 IO.mapRequired("install-name", Keys->InstallName);

1025 IO.mapOptional("current-version", Keys->CurrentVersion,

1027 IO.mapOptional("compatibility-version", Keys->CompatibilityVersion,

1029 IO.mapOptional("swift-abi-version", Keys->SwiftABIVersion, SwiftVersion(0));

1030 IO.mapOptional("parent-umbrella", Keys->ParentUmbrellas);

1031 auto OptionKind = MetadataSection::Option::Clients;

1033 OptionKind);

1034 OptionKind = MetadataSection::Option::Libraries;

1036 OptionKind);

1040 }

1041};

1042

1043template <>

1045 static size_t size(IO &IO, std::vector<const MachO::InterfaceFile *> &Seq) {

1046 return Seq.size();

1047 }

1049 element(IO &IO, std::vector<const InterfaceFile *> &Seq, size_t Index) {

1050 if (Index >= Seq.size())

1051 Seq.resize(Index + 1);

1052 return Seq[Index];

1053 }

1054};

1055

1056}

1057}

1058

1060 auto *File = static_cast<TextAPIContext *>(Context);

1063

1068

1069 NewDiag.print(nullptr, S);

1070 File->ErrorMessage = ("malformed file\n" + Message).str();

1071}

1072

1075 if (TAPIFile.starts_with("{") && TAPIFile.ends_with("}"))

1077

1078 if (!TAPIFile.ends_with("..."))

1079 return createStringError(std::errc::not_supported, "unsupported file type");

1080

1081 if (TAPIFile.starts_with("--- !tapi-tbd"))

1083

1084 if (TAPIFile.starts_with("--- !tapi-tbd-v3"))

1086

1087 if (TAPIFile.starts_with("--- !tapi-tbd-v2"))

1089

1090 if (TAPIFile.starts_with("--- !tapi-tbd-v1") ||

1091 TAPIFile.starts_with("---\narchs:"))

1093

1094 return createStringError(std::errc::not_supported, "unsupported file type");

1095}

1096

1101 if (auto FTOrErr = canRead(InputBuffer))

1102 Ctx.FileKind = *FTOrErr;

1103 else

1104 return FTOrErr.takeError();

1105

1106

1109 if (!FileOrErr)

1110 return FileOrErr.takeError();

1111

1112 (*FileOrErr)->setPath(Ctx.Path);

1113 return std::move(*FileOrErr);

1114 }

1116

1117

1118 std::vector<const InterfaceFile *> Files;

1119 YAMLIn >> Files;

1120

1121

1122

1123 auto File = std::unique_ptr(

1125

1127 File->addDocument(

1128 std::shared_ptr(const_cast<InterfaceFile *>(FI)));

1129

1130 if (YAMLIn.error())

1132

1133 return std::move(File);

1134}

1135

1137 const FileType FileKind, bool Compact) {

1139 Ctx.Path = std::string(File.getPath());

1140

1141

1142

1143 Ctx.FileKind =

1144 (FileKind == FileType::Invalid) ? File.getFileType() : FileKind;

1145

1146

1149 }

1150

1152

1153 std::vector<const InterfaceFile *> Files;

1154 Files.emplace_back(&File);

1155

1156 for (const auto &Document : File.documents())

1157 Files.emplace_back(Document.get());

1158

1159

1160 YAMLOut << Files;

1161

1163}

assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")

static cl::opt< ITMode > IT(cl::desc("IT block support"), cl::Hidden, cl::init(DefaultIT), cl::values(clEnumValN(DefaultIT, "arm-default-it", "Generate any type of IT block"), clEnumValN(RestrictedIT, "arm-restrict-it", "Disallow complex IT blocks")))

This file defines the BumpPtrAllocator interface.

Replace intrinsics with calls to vector library

This file defines the SmallString class.

std::pair< llvm::MachO::Target, std::string > UUID

@ NotApplicationExtensionSafe

static void DiagHandler(const SMDiagnostic &Diag, void *Context)

Definition TextStub.cpp:1059

#define LLVM_YAML_IS_SEQUENCE_VECTOR(type)

Utility for declaring that a std::vector of a particular type should be considered a YAML sequence.

#define LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR(type)

Utility for declaring that a std::vector of a particular type should be considered a YAML flow sequen...

Lightweight error class with error context and mandatory checking.

static ErrorSuccess success()

Create a success value.

Tagged union holding either a T or a Error.

Defines the interface file.

SymbolSet::const_filtered_symbol_range const_filtered_symbol_range

bool isWeakDefined() const

const_target_range targets() const

bool isThreadLocalValue() const

ArchitectureSet getArchitectures() const

StringRef getName() const

EncodeKind getKind() const

bool isWeakReferenced() const

static LLVM_ABI llvm::Expected< Target > create(StringRef Target)

static LLVM_ABI Expected< FileType > canRead(MemoryBufferRef InputBuffer)

Determine whether input can be interpreted as TAPI text file.

Definition TextStub.cpp:1073

static LLVM_ABI Expected< std::unique_ptr< InterfaceFile > > get(MemoryBufferRef InputBuffer)

Parse and get an InterfaceFile that represents the full library.

Definition TextStub.cpp:1098

static LLVM_ABI Error writeToStream(raw_ostream &OS, const InterfaceFile &File, const FileType FileKind=FileType::Invalid, bool Compact=false)

Write TAPI text file contents into stream.

Definition TextStub.cpp:1136

StringRef getBufferIdentifier() const

StringRef getBuffer() const

Instances of this class encapsulate one diagnostic report, allowing printing to a raw_ostream as a ca...

LLVM_ABI void print(const char *ProgName, raw_ostream &S, bool ShowColors=true, bool ShowKindLabel=true, bool ShowLocation=true) const

SourceMgr::DiagKind getKind() const

StringRef getLineContents() const

StringRef getMessage() const

ArrayRef< SMFixIt > getFixIts() const

ArrayRef< std::pair< unsigned, unsigned > > getRanges() const

const SourceMgr * getSourceMgr() const

SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...

reference emplace_back(ArgTypes &&... Args)

iterator insert(iterator I, T &&Elt)

StringRef - Represent a constant reference to a string, i.e.

std::string str() const

str - Get the contents as an std::string.

StringRef trim(char Char) const

Return string with consecutive Char characters starting from the left and right removed.

Target - Wrapper for Target specific information.

LLVM Value Representation.

This class implements an extremely fast bulk output stream that can only output to a stream.

A raw_ostream that writes to an SmallVector or SmallString.

A YAML Stream is a sequence of Documents.

void bitSetCase(T &Val, StringRef Str, const T ConstVal)

virtual bool outputting() const =0

virtual bool mapTag(StringRef Tag, bool Default=false)=0

void mapOptionalWithContext(StringRef Key, T &Val, Context &Ctx)

void mapOptional(StringRef Key, T &Val)

virtual void setError(const Twine &)=0

void * getContext() const

void mapRequired(StringRef Key, T &Val)

The Input class is used to parse a yaml document into in-memory structs and vectors.

std::error_code error() override

The Output class is used to generate a yaml document from in-memory structs and vectors.

#define llvm_unreachable(msg)

Marks that the current location is not supposed to be reachable.

FileType

Defines the file type TextAPI files can represent.

@ Invalid

Invalid file type.

@ TBD_V1

Text-based stub file (.tbd) version 1.0.

@ TBD_V3

Text-based stub file (.tbd) version 3.0.

@ TBD_V5

Text-based stub file (.tbd) version 5.0.

@ TBD_V4

Text-based stub file (.tbd) version 4.0.

@ TBD_V2

Text-based stub file (.tbd) version 2.0.

Error serializeInterfaceFileToJSON(raw_ostream &OS, const InterfaceFile &File, const FileType FileKind, bool Compact)

SmallSet< PlatformType, 3 > PlatformSet

ObjCConstraintType

Defines a list of Objective-C constraints.

@ Retain_Release

Retain/Release.

Architecture

Defines the architecture slices that are supported by Text-based Stub files.

LLVM_ABI PlatformType mapToPlatformType(PlatformType Platform, bool WantSim)

Expected< std::unique_ptr< InterfaceFile > > getInterfaceFileFromJSON(StringRef JSON)

@ ObjectiveCInstanceVariable

@ ThreadLocalValue

Thread-local value symbol.

@ WeakReferenced

Weak referenced symbol.

@ WeakDefined

Weak defined symbol.

SmallVector< Target, 5 > TargetList

constexpr StringLiteral ObjC2EHTypePrefix

QuotingType

Describe which type of quotes should be used when quoting is necessary.

This is an optimization pass for GlobalISel generic memory operations.

auto drop_begin(T &&RangeOrContainer, size_t N=1)

Return a range covering RangeOrContainer with the first N elements excluded.

Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)

Create formatted StringError object.

void sort(IteratorTy Start, IteratorTy End)

Error make_error(ArgTs &&... Args)

Make a Error instance representing failure using the given error info type.

BumpPtrAllocatorImpl<> BumpPtrAllocator

The standard BumpPtrAllocator which just uses the default template parameters.

void consumeError(Error Err)

Consume a Error without doing anything.

Implement std::hash so that hash_code can be used in STL containers.

static const InterfaceFile *& element(IO &IO, std::vector< const InterfaceFile * > &Seq, size_t Index)

Definition TextStub.cpp:1049

static size_t size(IO &IO, std::vector< const MachO::InterfaceFile * > &Seq)

Definition TextStub.cpp:1045

This class should be specialized by any type that needs to be converted to/from a list of YAML docume...

static void mapping(IO &IO, MetadataSection &Section, MetadataSection::Option &OptionKind)

Definition TextStub.cpp:341

This class is similar to MappingTraits but allows you to pass in additional context for each map o...

static void mapping(IO &IO, ExportSection &Section)

Definition TextStub.cpp:276

static void mapping(IO &IO, SymbolSection &Section)

Definition TextStub.cpp:314

static void mapping(IO &IO, UUIDv4 &UUID)

Definition TextStub.cpp:333

static void mapping(IO &IO, UmbrellaSection &Section)

Definition TextStub.cpp:326

static void mapping(IO &IO, UndefinedSection &Section)

Definition TextStub.cpp:298

SectionList Exports

Definition TextStub.cpp:952

StringRef InstallName

Definition TextStub.cpp:944

std::vector< UmbrellaSection > ParentUmbrellas

Definition TextStub.cpp:951

PackedVersion CurrentVersion

Definition TextStub.cpp:945

SectionList Reexports

Definition TextStub.cpp:953

TargetList Targets

Definition TextStub.cpp:943

std::vector< UUIDv4 > UUIDs

Definition TextStub.cpp:942

NormalizedTBD_V4(IO &IO)

Definition TextStub.cpp:767

TBDFlags Flags

Definition TextStub.cpp:950

SectionList Undefineds

Definition TextStub.cpp:954

std::vector< MetadataSection > AllowableClients

Definition TextStub.cpp:948

PackedVersion CompatibilityVersion

Definition TextStub.cpp:946

SwiftVersion SwiftABIVersion

Definition TextStub.cpp:947

unsigned TBDVersion

Definition TextStub.cpp:941

std::vector< MetadataSection > ReexportedLibraries

Definition TextStub.cpp:949

const InterfaceFile * denormalize(IO &IO)

Definition TextStub.cpp:861

NormalizedTBD_V4(IO &IO, const InterfaceFile *&File)

Definition TextStub.cpp:768

StringRef ParentUmbrella

Definition TextStub.cpp:704

std::vector< UndefinedSection > Undefineds

Definition TextStub.cpp:706

NormalizedTBD(IO &IO, const InterfaceFile *&File)

Definition TextStub.cpp:402

StringRef copyString(StringRef String)

Definition TextStub.cpp:686

TargetList synthesizeTargets(ArchitectureSet Architectures, const PlatformSet &Platforms)

Definition TextStub.cpp:555

std::vector< UUID > UUIDs

Definition TextStub.cpp:696

const InterfaceFile * denormalize(IO &IO)

Definition TextStub.cpp:572

StringRef InstallName

Definition TextStub.cpp:698

SwiftVersion SwiftABIVersion

Definition TextStub.cpp:701

std::vector< Architecture > Architectures

Definition TextStub.cpp:695

ObjCConstraintType ObjCConstraint

Definition TextStub.cpp:702

llvm::BumpPtrAllocator Allocator

Definition TextStub.cpp:685

PackedVersion CurrentVersion

Definition TextStub.cpp:699

TBDFlags Flags

Definition TextStub.cpp:703

std::vector< ExportSection > Exports

Definition TextStub.cpp:705

NormalizedTBD(IO &IO)

Definition TextStub.cpp:401

PlatformSet Platforms

Definition TextStub.cpp:697

PackedVersion CompatibilityVersion

Definition TextStub.cpp:700

static void mapKeysToValuesV4(IO &IO, const InterfaceFile *&File)

Definition TextStub.cpp:1015

static void setFileTypeForInput(TextAPIContext *Ctx, IO &IO)

Definition TextStub.cpp:709

std::vector< SymbolSection > SectionList

Definition TextStub.cpp:765

static void mapping(IO &IO, const InterfaceFile *&File)

Definition TextStub.cpp:725

static void mapKeysToValues(FileType FileKind, IO &IO, const InterfaceFile *&File)

Definition TextStub.cpp:984

This class should be specialized by any type that needs to be converted to/from a YAML mapping.

static void bitset(IO &IO, TBDFlags &Flags)

Definition TextStub.cpp:357

This class should be specialized by any integer type that is a union of bit values and the YAML repre...

static StringRef input(StringRef Scalar, void *, Target &Value)

Definition TextStub.cpp:380

static void output(const Target &Value, void *, raw_ostream &OS)

Definition TextStub.cpp:368

static QuotingType mustQuote(StringRef)

Definition TextStub.cpp:396

This class should be specialized by type that requires custom conversion to/from a yaml scalar.