aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
diff options
context:
space:
mode:
authorDaniel Grumberg <dgrumberg@apple.com>2024-05-13 10:37:09 +0100
committerGitHub <noreply@github.com>2024-05-13 10:37:09 +0100
commit61d4ca872215d3dfff0b3c92151dcbdc546a0aab (patch)
treeed3e238d5fb1ac0aa6721f6a5d2f823cc8604192 /clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
parentc6c7afd21edd0d16ebda916ea4939949e4e0fa8e (diff)
downloadllvm-61d4ca872215d3dfff0b3c92151dcbdc546a0aab.zip
llvm-61d4ca872215d3dfff0b3c92151dcbdc546a0aab.tar.gz
llvm-61d4ca872215d3dfff0b3c92151dcbdc546a0aab.tar.bz2
[clang][ExtractAPI] Distinguish between record kind for display and for RTTI (#91466)
rdar://127732562
Diffstat (limited to 'clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp')
-rw-r--r--clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp b/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
index 34278b5..c16d462 100644
--- a/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
+++ b/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
@@ -514,7 +514,7 @@ Object serializeSymbolKind(APIRecord::RecordKind RK, Language Lang) {
/// which is prefixed by the source language name, useful for tooling to parse
/// the kind, and a \c displayName for rendering human-readable names.
Object serializeSymbolKind(const APIRecord &Record, Language Lang) {
- return serializeSymbolKind(Record.getKind(), Lang);
+ return serializeSymbolKind(Record.KindForDisplay, Lang);
}
/// Serialize the function signature field, as specified by the
@@ -591,8 +591,8 @@ Array generateParentContexts(const SmallVectorImpl<SymbolReference> &Parents,
Elem["usr"] = Parent.USR;
Elem["name"] = Parent.Name;
if (Parent.Record)
- Elem["kind"] =
- serializeSymbolKind(Parent.Record->getKind(), Lang)["identifier"];
+ Elem["kind"] = serializeSymbolKind(Parent.Record->KindForDisplay,
+ Lang)["identifier"];
else
Elem["kind"] =
serializeSymbolKind(APIRecord::RK_Unknown, Lang)["identifier"];