Lines Matching defs:Key
162 static llvm::SmallString<128> getParseErrorMsg(TBDKey Key) {
163 return {"invalid ", Keys[Key], " section"};
166 static llvm::SmallString<128> getSerializeErrorMsg(TBDKey Key) {
167 return {"missing ", Keys[Key], " information"};
185 TBDKey Key, const Object *Obj,
188 std::optional<JsonT> Val = GetValue(Obj, Keys[Key]);
190 return make_error<JSONStubError>(getParseErrorMsg(Key));
197 return make_error<JSONStubError>(getParseErrorMsg(Key));
203 TBDKey Key, const Object *Obj,
207 std::optional<JsonT> Val = GetValue(Obj, Keys[Key]);
214 return make_error<JSONStubError>(getParseErrorMsg(Key));
218 Error collectFromArray(TBDKey Key, const Object *Obj,
221 const auto *Values = Obj->getArray(Keys[Key]);
224 return make_error<JSONStubError>(getParseErrorMsg(Key));
231 return make_error<JSONStubError>(getParseErrorMsg(Key));
380 Expected<TargetsToSymbols> getSymbolSection(const Object *File, TBDKey Key,
383 const Array *Section = File->getArray(Keys[Key]);
388 switch (Key) {
421 return make_error<JSONStubError>(getParseErrorMsg(Key));
440 Expected<AttrToTargets> getLibSection(const Object *File, TBDKey Key,
443 auto *Section = File->getArray(Keys[Key]);
462 collectFromArray(SubKey, Obj, [&Result, &MappedTargets](StringRef Key) {
463 Result[Key.str()] = MappedTargets;
522 Expected<PackedVersion> getPackedVersion(const Object *File, TBDKey Key) {
523 const Array *Versions = File->getArray(Keys[Key]);
530 return make_error<JSONStubError>(getParseErrorMsg(Key));
740 bool insertNonEmptyValues(Object &Obj, TBDKey Key, ContainerT &&Contents) {
743 Obj[Keys[Key]] = std::move(Contents);
780 Array serializeScalar(TBDKey Key, ValueT Value, ValueT Default = ValueT()) {
784 Object ScalarObj({Object::KV({Keys[Key], EntryT(Value)})});
794 Array serializeAttrToTargets(AggregateT &Entries, TBDKey Key) {
799 Obj[Keys[Key]] = Values;
807 Array serializeField(TBDKey Key, const AggregateT &Values,
817 return serializeAttrToTargets(FinalEntries, Key);
823 return serializeAttrToTargets(FinalEntries, Key);
826 Array serializeField(TBDKey Key, const std::vector<InterfaceFileRef> &Values,
834 return serializeAttrToTargets(FinalEntries, Key);