Lines Matching defs:File
240 Expected<FileType> getVersion(const Object *File) {
242 TBDKey::TBDVersion, File, &Object::getInteger,
366 Expected<StringRef> getNameSection(const Object *File) {
367 const Array *Section = File->getArray(Keys[TBDKey::InstallName]);
380 Expected<TargetsToSymbols> getSymbolSection(const Object *File, TBDKey Key,
383 const Array *Section = File->getArray(Keys[Key]);
440 Expected<AttrToTargets> getLibSection(const Object *File, TBDKey Key,
443 auto *Section = File->getArray(Keys[Key]);
472 Expected<AttrToTargets> getUmbrellaSection(const Object *File,
474 const auto *Umbrella = File->getArray(Keys[TBDKey::ParentUmbrella]);
504 Expected<uint8_t> getSwiftVersion(const Object *File) {
505 const Array *Versions = File->getArray(Keys[TBDKey::SwiftABI]);
522 Expected<PackedVersion> getPackedVersion(const Object *File, TBDKey Key) {
523 const Array *Versions = File->getArray(Keys[Key]);
548 Expected<TBDFlags> getFlags(const Object *File) {
550 const Array *Section = File->getArray(Keys[TBDKey::Flags]);
584 Expected<IFPtr> parseToInterfaceFile(const Object *File) {
585 auto TargetsOrErr = getTargetsSection(File);
590 auto NameOrErr = getNameSection(File);
595 auto CurrVersionOrErr = getPackedVersion(File, TBDKey::CurrentVersion);
600 auto CompVersionOrErr = getPackedVersion(File, TBDKey::CompatibilityVersion);
605 auto SwiftABIOrErr = getSwiftVersion(File);
610 auto FlagsOrErr = getFlags(File);
615 auto UmbrellasOrErr = getUmbrellaSection(File, Targets);
621 getLibSection(File, TBDKey::AllowableClients, TBDKey::Clients, Targets);
627 getLibSection(File, TBDKey::ReexportLibs, TBDKey::Names, Targets);
632 auto RPathsOrErr = getLibSection(File, TBDKey::RPath, TBDKey::Paths, Targets);
637 auto ExportsOrErr = getSymbolSection(File, TBDKey::Exports, Targets);
642 auto ReexportsOrErr = getSymbolSection(File, TBDKey::Reexports, Targets);
647 auto UndefinedsOrErr = getSymbolSection(File, TBDKey::Undefineds, Targets);
689 Expected<std::vector<IFPtr>> getInlinedLibs(const Object *File) {
691 const Array *Files = File->getArray(Keys[TBDKey::Documents]);
730 for (auto &File : *IFsOrErr) {
731 File->setFileType(Version);
732 IF->addDocument(std::shared_ptr<InterfaceFile>(std::move(File)));
922 Array serializeFlags(const InterfaceFile *File) {
925 if (!File->isTwoLevelNamespace())
927 if (!File->isApplicationExtensionSafe())
929 if (File->hasSimulatorSupport())
931 if (File->isOSLibNotForSharedCache())
936 Expected<Object> serializeIF(const InterfaceFile *File) {
940 TargetList ActiveTargets{File->targets().begin(), File->targets().end()};
945 Array Name = serializeScalar<StringRef>(TBDKey::Name, File->getInstallName());
950 Array Flags = serializeFlags(File);
954 TBDKey::Version, File->getCurrentVersion(), PackedVersion(1, 0, 0));
958 TBDKey::Version, File->getCompatibilityVersion(), PackedVersion(1, 0, 0));
963 TBDKey::ABI, File->getSwiftABIVersion(), 0u);
966 Array RPaths = serializeField(TBDKey::Paths, File->rpaths(), ActiveTargets);
969 Array Umbrellas = serializeField(TBDKey::Umbrella, File->umbrellas(),
974 serializeField(TBDKey::Clients, File->allowableClients(), ActiveTargets);
978 serializeField(TBDKey::Names, File->reexportedLibraries(), ActiveTargets);
982 Array Exports = serializeSymbols(File->exports(), ActiveTargets);
985 Array Reexports = serializeSymbols(File->reexports(), ActiveTargets);
988 if (!File->isTwoLevelNamespace()) {
989 Array Undefineds = serializeSymbols(File->undefineds(), ActiveTargets);
996 Expected<Object> getJSON(const InterfaceFile *File, const FileType FileKind) {
1000 auto MainLibOrErr = serializeIF(File);
1005 for (const auto &Doc : File->documents()) {
1020 const InterfaceFile &File,
1023 auto TextFile = getJSON(&File, FileKind);