[clang][ExtractAPI] Add targetFallback to relationships in symbol graph
Adds a 'targetFallback' field to relationships in symbol graph that contains the plain name of the relationship target. This is useful for clients when the relationship target symbol is not available. Differential Revision: https://reviews.llvm.org/D136455
This commit is contained in:
@@ -559,6 +559,7 @@ void SymbolGraphSerializer::serializeRelationship(RelationshipKind Kind,
|
||||
Object Relationship;
|
||||
Relationship["source"] = Source.USR;
|
||||
Relationship["target"] = Target.USR;
|
||||
Relationship["targetFallback"] = Target.Name;
|
||||
Relationship["kind"] = getRelationshipString(Kind);
|
||||
|
||||
Relationships.emplace_back(std::move(Relationship));
|
||||
|
||||
Reference in New Issue
Block a user