Skip to content

Commit

Permalink
[clang][extract-api] Don't emit symbols prefixed with an underscore
Browse files Browse the repository at this point in the history
These symbols are understood to not be used for client API consumption
by convention so they should not appear in the generated symbol graph.

Differential Revision: https://reviews.llvm.org/D125678
  • Loading branch information
daniel-grumberg committed May 25, 2022
1 parent 23bb550 commit 504736c
Show file tree
Hide file tree
Showing 2 changed files with 401 additions and 0 deletions.
5 changes: 5 additions & 0 deletions clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
Expand Up @@ -467,6 +467,11 @@ bool SymbolGraphSerializer::shouldSkip(const APIRecord &Record) const {
if (Record.Availability.isUnconditionallyUnavailable())
return true;

// Filter out symbols prefixed with an underscored as they are understood to
// be symbols clients should not use.
if (Record.Name.startswith("_"))
return true;

return false;
}

Expand Down

0 comments on commit 504736c

Please sign in to comment.