Lines Matching refs:TBDKey
86 enum TBDKey : size_t { enum
162 static llvm::SmallString<128> getParseErrorMsg(TBDKey Key) { in getParseErrorMsg()
166 static llvm::SmallString<128> getSerializeErrorMsg(TBDKey Key) { in getSerializeErrorMsg()
185 TBDKey Key, const Object *Obj, in getRequiredValue()
203 TBDKey Key, const Object *Obj, in getRequiredValue()
218 Error collectFromArray(TBDKey Key, const Object *Obj, in collectFromArray()
242 TBDKey::TBDVersion, File, &Object::getInteger, in getVersion()
256 const auto *Targets = Section->getArray(Keys[TBDKey::Targets]); in getTargets()
258 return make_error<JSONStubError>(getParseErrorMsg(TBDKey::Targets)); in getTargets()
264 return make_error<JSONStubError>(getParseErrorMsg(TBDKey::Target)); in getTargets()
267 return make_error<JSONStubError>(getParseErrorMsg(TBDKey::Target)); in getTargets()
274 const Array *Targets = Section->getArray(Keys[TBDKey::TargetInfo]); in getTargetsSection()
276 return make_error<JSONStubError>(getParseErrorMsg(TBDKey::Targets)); in getTargetsSection()
282 return make_error<JSONStubError>(getParseErrorMsg(TBDKey::Target)); in getTargetsSection()
284 getRequiredValue<StringRef>(TBDKey::Target, Obj, &Object::getString); in getTargetsSection()
286 return make_error<JSONStubError>(getParseErrorMsg(TBDKey::Target)); in getTargetsSection()
289 return make_error<JSONStubError>(getParseErrorMsg(TBDKey::Target)); in getTargetsSection()
291 auto VersionStr = Obj->getString(Keys[TBDKey::Deployment]); in getTargetsSection()
294 return make_error<JSONStubError>(getParseErrorMsg(TBDKey::Deployment)); in getTargetsSection()
308 TBDKey::Globals, Segment, [&Result, &SectionFlag](StringRef Name) { in collectSymbolsFromSegment()
316 TBDKey::ObjCClass, Segment, [&Result, &SectionFlag](StringRef Name) { in collectSymbolsFromSegment()
323 Err = collectFromArray(TBDKey::ObjCEHType, Segment, in collectSymbolsFromSegment()
333 TBDKey::ObjCIvar, Segment, [&Result, &SectionFlag](StringRef Name) { in collectSymbolsFromSegment()
347 TBDKey::Weak, Segment, [&Result, WeakFlag](StringRef Name) { in collectSymbolsFromSegment()
355 TBDKey::ThreadLocal, Segment, [&Result, SectionFlag](StringRef Name) { in collectSymbolsFromSegment()
367 const Array *Section = File->getArray(Keys[TBDKey::InstallName]); in getNameSection()
369 return make_error<JSONStubError>(getParseErrorMsg(TBDKey::InstallName)); in getNameSection()
375 return make_error<JSONStubError>(getParseErrorMsg(TBDKey::InstallName)); in getNameSection()
377 return getRequiredValue<StringRef>(TBDKey::Name, Obj, &Object::getString); in getNameSection()
380 Expected<TargetsToSymbols> getSymbolSection(const Object *File, TBDKey Key, in getSymbolSection()
389 case TBDKey::Reexports: in getSymbolSection()
392 case TBDKey::Undefineds: in getSymbolSection()
417 auto *DataSection = Obj->getObject(Keys[TBDKey::Data]); in getSymbolSection()
418 auto *TextSection = Obj->getObject(Keys[TBDKey::Text]); in getSymbolSection()
440 Expected<AttrToTargets> getLibSection(const Object *File, TBDKey Key, in getLibSection()
441 TBDKey SubKey, in getLibSection()
474 const auto *Umbrella = File->getArray(Keys[TBDKey::ParentUmbrella]); in getUmbrellaSection()
484 getParseErrorMsg(TBDKey::ParentUmbrella)); in getUmbrellaSection()
496 getRequiredValue<StringRef>(TBDKey::Umbrella, Obj, &Object::getString); in getUmbrellaSection()
505 const Array *Versions = File->getArray(Keys[TBDKey::SwiftABI]); in getSwiftVersion()
512 return make_error<JSONStubError>(getParseErrorMsg(TBDKey::SwiftABI)); in getSwiftVersion()
515 return getRequiredValue<int64_t, uint8_t>(TBDKey::ABI, Obj, in getSwiftVersion()
522 Expected<PackedVersion> getPackedVersion(const Object *File, TBDKey Key) { in getPackedVersion()
541 TBDKey::Version, Obj, &Object::getString, PackedVersion(1, 0, 0), in getPackedVersion()
550 const Array *Section = File->getArray(Keys[TBDKey::Flags]); in getFlags()
558 return make_error<JSONStubError>(getParseErrorMsg(TBDKey::Flags)); in getFlags()
561 collectFromArray(TBDKey::Attributes, Obj, [&Flags](StringRef Flag) { in getFlags()
595 auto CurrVersionOrErr = getPackedVersion(File, TBDKey::CurrentVersion); in parseToInterfaceFile()
600 auto CompVersionOrErr = getPackedVersion(File, TBDKey::CompatibilityVersion); in parseToInterfaceFile()
621 getLibSection(File, TBDKey::AllowableClients, TBDKey::Clients, Targets); in parseToInterfaceFile()
627 getLibSection(File, TBDKey::ReexportLibs, TBDKey::Names, Targets); in parseToInterfaceFile()
632 auto RPathsOrErr = getLibSection(File, TBDKey::RPath, TBDKey::Paths, Targets); in parseToInterfaceFile()
637 auto ExportsOrErr = getSymbolSection(File, TBDKey::Exports, Targets); in parseToInterfaceFile()
642 auto ReexportsOrErr = getSymbolSection(File, TBDKey::Reexports, Targets); in parseToInterfaceFile()
647 auto UndefinedsOrErr = getSymbolSection(File, TBDKey::Undefineds, Targets); in parseToInterfaceFile()
691 const Array *Files = File->getArray(Keys[TBDKey::Documents]); in getInlinedLibs()
720 Object *MainLib = Root->getObject(Keys[TBDKey::MainLibrary]); in getInterfaceFileFromJSON()
740 bool insertNonEmptyValues(Object &Obj, TBDKey Key, ContainerT &&Contents) { in insertNonEmptyValues()
772 TargetInfo[Keys[TBDKey::Deployment]] = Targ.MinDeployment.getAsString(); in serializeTargetInfo()
773 TargetInfo[Keys[TBDKey::Target]] = getFormattedStr(Targ); in serializeTargetInfo()
780 Array serializeScalar(TBDKey Key, ValueT Value, ValueT Default = ValueT()) { in serializeScalar()
794 Array serializeAttrToTargets(AggregateT &Entries, TBDKey Key) { in serializeAttrToTargets()
798 insertNonEmptyValues(Obj, TBDKey::Targets, std::move(Targets)); in serializeAttrToTargets()
807 Array serializeField(TBDKey Key, const AggregateT &Values, in serializeField()
826 Array serializeField(TBDKey Key, const std::vector<InterfaceFileRef> &Values, in serializeField()
894 auto InsertSymbolsToJSON = [](Object &SymSection, TBDKey SegmentKey, in serializeSymbols()
899 insertNonEmptyValues(Segment, TBDKey::Globals, std::move(SymField.Globals)); in serializeSymbols()
900 insertNonEmptyValues(Segment, TBDKey::ThreadLocal, std::move(SymField.TLV)); in serializeSymbols()
901 insertNonEmptyValues(Segment, TBDKey::Weak, std::move(SymField.Weaks)); in serializeSymbols()
902 insertNonEmptyValues(Segment, TBDKey::ObjCClass, in serializeSymbols()
904 insertNonEmptyValues(Segment, TBDKey::ObjCEHType, in serializeSymbols()
906 insertNonEmptyValues(Segment, TBDKey::ObjCIvar, std::move(SymField.IVars)); in serializeSymbols()
913 insertNonEmptyValues(AllSyms, TBDKey::Targets, std::move(Targets)); in serializeSymbols()
914 InsertSymbolsToJSON(AllSyms, TBDKey::Data, Fields.Data); in serializeSymbols()
915 InsertSymbolsToJSON(AllSyms, TBDKey::Text, Fields.Text); in serializeSymbols()
933 return serializeScalar(TBDKey::Attributes, std::move(Flags)); in serializeFlags()
941 if (!insertNonEmptyValues(Library, TBDKey::TargetInfo, in serializeIF()
943 return make_error<JSONStubError>(getSerializeErrorMsg(TBDKey::TargetInfo)); in serializeIF()
945 Array Name = serializeScalar<StringRef>(TBDKey::Name, File->getInstallName()); in serializeIF()
946 if (!insertNonEmptyValues(Library, TBDKey::InstallName, std::move(Name))) in serializeIF()
947 return make_error<JSONStubError>(getSerializeErrorMsg(TBDKey::InstallName)); in serializeIF()
951 insertNonEmptyValues(Library, TBDKey::Flags, std::move(Flags)); in serializeIF()
954 TBDKey::Version, File->getCurrentVersion(), PackedVersion(1, 0, 0)); in serializeIF()
955 insertNonEmptyValues(Library, TBDKey::CurrentVersion, std::move(CurrentV)); in serializeIF()
958 TBDKey::Version, File->getCompatibilityVersion(), PackedVersion(1, 0, 0)); in serializeIF()
959 insertNonEmptyValues(Library, TBDKey::CompatibilityVersion, in serializeIF()
963 TBDKey::ABI, File->getSwiftABIVersion(), 0u); in serializeIF()
964 insertNonEmptyValues(Library, TBDKey::SwiftABI, std::move(SwiftABI)); in serializeIF()
966 Array RPaths = serializeField(TBDKey::Paths, File->rpaths(), ActiveTargets); in serializeIF()
967 insertNonEmptyValues(Library, TBDKey::RPath, std::move(RPaths)); in serializeIF()
969 Array Umbrellas = serializeField(TBDKey::Umbrella, File->umbrellas(), in serializeIF()
971 insertNonEmptyValues(Library, TBDKey::ParentUmbrella, std::move(Umbrellas)); in serializeIF()
974 serializeField(TBDKey::Clients, File->allowableClients(), ActiveTargets); in serializeIF()
975 insertNonEmptyValues(Library, TBDKey::AllowableClients, std::move(Clients)); in serializeIF()
978 serializeField(TBDKey::Names, File->reexportedLibraries(), ActiveTargets); in serializeIF()
979 insertNonEmptyValues(Library, TBDKey::ReexportLibs, std::move(ReexportLibs)); in serializeIF()
983 insertNonEmptyValues(Library, TBDKey::Exports, std::move(Exports)); in serializeIF()
986 insertNonEmptyValues(Library, TBDKey::Reexports, std::move(Reexports)); in serializeIF()
990 insertNonEmptyValues(Library, TBDKey::Undefineds, std::move(Undefineds)); in serializeIF()
1003 Root[Keys[TBDKey::MainLibrary]] = std::move(*MainLibOrErr); in getJSON()
1012 Root[Keys[TBDKey::TBDVersion]] = 5; in getJSON()
1013 insertNonEmptyValues(Root, TBDKey::Documents, std::move(Documents)); in getJSON()