[clang][extract-api] Suppprt for the module name property in SymbolGraph
Adds `--product-name=` flag to the clang driver. This gets forwarded to cc1 only when we are performing a ExtractAPI Action. This is used to populate the `name` field of the module object in the generated SymbolGraph. Differential Revision: https://reviews.llvm.org/D122141
This commit is contained in:
@@ -376,10 +376,9 @@ Object SymbolGraphSerializer::serializeMetadata() const {
|
||||
|
||||
Object SymbolGraphSerializer::serializeModule() const {
|
||||
Object Module;
|
||||
// FIXME: We might not be building a module, some Clang-based languages might
|
||||
// not have a "module" concept. Figure out a way to provide a name to
|
||||
// describe the API set.
|
||||
Module["name"] = "";
|
||||
// The user is expected to always pass `--product-name=` on the command line
|
||||
// to populate this field.
|
||||
Module["name"] = ProductName;
|
||||
serializeObject(Module, "platform", serializePlatform(API.getTarget()));
|
||||
return Module;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user