Lines Matching refs:IO

287   static void mapping(IO &IO, ExportSection &Section) {  in mapping()
288 const auto *Ctx = reinterpret_cast<TextAPIContext *>(IO.getContext()); in mapping()
292 IO.mapRequired("archs", Section.Architectures); in mapping()
294 IO.mapOptional("allowed-clients", Section.AllowableClients); in mapping()
296 IO.mapOptional("allowable-clients", Section.AllowableClients); in mapping()
297 IO.mapOptional("re-exports", Section.ReexportedLibraries); in mapping()
298 IO.mapOptional("symbols", Section.Symbols); in mapping()
299 IO.mapOptional("objc-classes", Section.Classes); in mapping()
301 IO.mapOptional("objc-eh-types", Section.ClassEHs); in mapping()
302 IO.mapOptional("objc-ivars", Section.IVars); in mapping()
303 IO.mapOptional("weak-def-symbols", Section.WeakDefSymbols); in mapping()
304 IO.mapOptional("thread-local-symbols", Section.TLVSymbols); in mapping()
309 static void mapping(IO &IO, UndefinedSection &Section) { in mapping()
310 const auto *Ctx = reinterpret_cast<TextAPIContext *>(IO.getContext()); in mapping()
314 IO.mapRequired("archs", Section.Architectures); in mapping()
315 IO.mapOptional("symbols", Section.Symbols); in mapping()
316 IO.mapOptional("objc-classes", Section.Classes); in mapping()
318 IO.mapOptional("objc-eh-types", Section.ClassEHs); in mapping()
319 IO.mapOptional("objc-ivars", Section.IVars); in mapping()
320 IO.mapOptional("weak-ref-symbols", Section.WeakRefSymbols); in mapping()
325 static void mapping(IO &IO, SymbolSection &Section) { in mapping()
326 IO.mapRequired("targets", Section.Targets); in mapping()
327 IO.mapOptional("symbols", Section.Symbols); in mapping()
328 IO.mapOptional("objc-classes", Section.Classes); in mapping()
329 IO.mapOptional("objc-eh-types", Section.ClassEHs); in mapping()
330 IO.mapOptional("objc-ivars", Section.Ivars); in mapping()
331 IO.mapOptional("weak-symbols", Section.WeakSymbols); in mapping()
332 IO.mapOptional("thread-local-symbols", Section.TlvSymbols); in mapping()
337 static void mapping(IO &IO, UmbrellaSection &Section) { in mapping()
338 IO.mapRequired("targets", Section.Targets); in mapping()
339 IO.mapRequired("umbrella", Section.Umbrella); in mapping()
344 static void mapping(IO &IO, UUIDv4 &UUID) { in mapping()
345 IO.mapRequired("target", UUID.TargetID); in mapping()
346 IO.mapRequired("value", UUID.Value); in mapping()
352 static void mapping(IO &IO, MetadataSection &Section, in mapping()
354 IO.mapRequired("targets", Section.Targets); in mapping()
357 IO.mapRequired("clients", Section.Values); in mapping()
360 IO.mapRequired("libraries", Section.Values); in mapping()
368 static void bitset(IO &IO, TBDFlags &Flags) { in bitset()
369 IO.bitSetCase(Flags, "flat_namespace", TBDFlags::FlatNamespace); in bitset()
370 IO.bitSetCase(Flags, "not_app_extension_safe", in bitset()
372 IO.bitSetCase(Flags, "installapi", TBDFlags::InstallAPI); in bitset()
437 explicit NormalizedTBD(IO &IO) {} in NormalizedTBD()
438 NormalizedTBD(IO &IO, const InterfaceFile *&File) { in NormalizedTBD()
612 const InterfaceFile *denormalize(IO &IO) { in denormalize()
613 auto Ctx = reinterpret_cast<TextAPIContext *>(IO.getContext()); in denormalize()
745 static void setFileTypeForInput(TextAPIContext *Ctx, IO &IO) { in setFileTypeForInput()
746 if (IO.mapTag("!tapi-tbd", false)) in setFileTypeForInput()
748 else if (IO.mapTag("!tapi-tbd-v3", false)) in setFileTypeForInput()
750 else if (IO.mapTag("!tapi-tbd-v2", false)) in setFileTypeForInput()
752 else if (IO.mapTag("!tapi-tbd-v1", false) || in setFileTypeForInput()
753 IO.mapTag("tag:yaml.org,2002:map", false)) in setFileTypeForInput()
761 static void mapping(IO &IO, const InterfaceFile *&File) { in mapping()
762 auto *Ctx = reinterpret_cast<TextAPIContext *>(IO.getContext()); in mapping()
763 assert((!Ctx || !IO.outputting() || in mapping()
767 if (!IO.outputting()) { in mapping()
768 setFileTypeForInput(Ctx, IO); in mapping()
773 mapKeysToValuesV4(IO, File); in mapping()
776 IO.setError("unsupported file type"); in mapping()
785 mapKeysToValuesV4(IO, File); in mapping()
788 IO.mapTag("!tapi-tbd-v3", true); in mapping()
791 IO.mapTag("!tapi-tbd-v2", true); in mapping()
798 mapKeysToValues(Ctx->FileKind, IO, File); in mapping()
803 explicit NormalizedTBD_V4(IO &IO) {} in NormalizedTBD_V4()
804 NormalizedTBD_V4(IO &IO, const InterfaceFile *&File) { in NormalizedTBD_V4()
805 auto Ctx = reinterpret_cast<TextAPIContext *>(IO.getContext()); in NormalizedTBD_V4()
907 const InterfaceFile *denormalize(IO &IO) { in denormalize()
908 auto Ctx = reinterpret_cast<TextAPIContext *>(IO.getContext()); in denormalize()
1021 static void mapKeysToValues(FileType FileKind, IO &IO, in mapKeysToValues()
1023 MappingNormalization<NormalizedTBD, const InterfaceFile *> Keys(IO, File); in mapKeysToValues()
1024 IO.mapRequired("archs", Keys->Architectures); in mapKeysToValues()
1026 IO.mapOptional("uuids", Keys->UUIDs); in mapKeysToValues()
1027 IO.mapRequired("platform", Keys->Platforms); in mapKeysToValues()
1029 IO.mapOptional("flags", Keys->Flags, TBDFlags::None); in mapKeysToValues()
1030 IO.mapRequired("install-name", Keys->InstallName); in mapKeysToValues()
1031 IO.mapOptional("current-version", Keys->CurrentVersion, in mapKeysToValues()
1033 IO.mapOptional("compatibility-version", Keys->CompatibilityVersion, in mapKeysToValues()
1036 IO.mapOptional("swift-version", Keys->SwiftABIVersion, SwiftVersion(0)); in mapKeysToValues()
1038 IO.mapOptional("swift-abi-version", Keys->SwiftABIVersion, in mapKeysToValues()
1040 IO.mapOptional("objc-constraint", Keys->ObjCConstraint, in mapKeysToValues()
1045 IO.mapOptional("parent-umbrella", Keys->ParentUmbrella, StringRef()); in mapKeysToValues()
1046 IO.mapOptional("exports", Keys->Exports); in mapKeysToValues()
1048 IO.mapOptional("undefineds", Keys->Undefineds); in mapKeysToValues()
1051 static void mapKeysToValuesV4(IO &IO, const InterfaceFile *&File) { in mapKeysToValuesV4()
1052 MappingNormalization<NormalizedTBD_V4, const InterfaceFile *> Keys(IO, in mapKeysToValuesV4()
1054 IO.mapTag("!tapi-tbd", true); in mapKeysToValuesV4()
1055 IO.mapRequired("tbd-version", Keys->TBDVersion); in mapKeysToValuesV4()
1056 IO.mapRequired("targets", Keys->Targets); in mapKeysToValuesV4()
1057 IO.mapOptional("uuids", Keys->UUIDs); in mapKeysToValuesV4()
1058 IO.mapOptional("flags", Keys->Flags, TBDFlags::None); in mapKeysToValuesV4()
1059 IO.mapRequired("install-name", Keys->InstallName); in mapKeysToValuesV4()
1060 IO.mapOptional("current-version", Keys->CurrentVersion, in mapKeysToValuesV4()
1062 IO.mapOptional("compatibility-version", Keys->CompatibilityVersion, in mapKeysToValuesV4()
1064 IO.mapOptional("swift-abi-version", Keys->SwiftABIVersion, SwiftVersion(0)); in mapKeysToValuesV4()
1065 IO.mapOptional("parent-umbrella", Keys->ParentUmbrellas); in mapKeysToValuesV4()
1067 IO.mapOptionalWithContext("allowable-clients", Keys->AllowableClients, in mapKeysToValuesV4()
1070 IO.mapOptionalWithContext("reexported-libraries", Keys->ReexportedLibraries, in mapKeysToValuesV4()
1072 IO.mapOptional("exports", Keys->Exports); in mapKeysToValuesV4()
1073 IO.mapOptional("reexports", Keys->Reexports); in mapKeysToValuesV4()
1074 IO.mapOptional("undefineds", Keys->Undefineds); in mapKeysToValuesV4()
1080 static size_t size(IO &IO, std::vector<const MachO::InterfaceFile *> &Seq) { in size()
1084 element(IO &IO, std::vector<const InterfaceFile *> &Seq, size_t Index) { in element()