Serialize symbol graphs for extended modules separately

When a module extends a type from another module, serialize those symbols into
separated files dedicated to those extended modules. This makes it easier to
ingest and categorize those symbols under the extended module if desired.

rdar://58941718
This commit is contained in:
Ashley Garland
2020-02-06 17:26:15 -08:00
parent be68f864e0
commit 7190073a85
35 changed files with 254 additions and 61 deletions

View File

@@ -403,6 +403,8 @@ public:
SmallVectorImpl<GenericSignature> &genericSignatures)
override;
StringRef getTargetTriple() const;
static bool classof(const FileUnit *file) {
return file->getKind() == FileUnitKind::SerializedAST;
}

View File

@@ -20,8 +20,8 @@ class ModuleDecl;
namespace symbolgraphgen {
struct SymbolGraphOptions {
/// The path to output the symbol graph JSON.
StringRef OutputPath;
/// The directory to output the symbol graph JSON files.
StringRef OutputDir;
/// The target of the module.
llvm::Triple Target;