mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add request to query primary files
Remove the `PrimarySourceFiles` vector from the frontend and replace it with a request on ModuleDecl that retrieves the primary files for the main module. This is in preparation for having `CompilerInstance::getMainModule` automatically populate the main module with files when queried.
This commit is contained in:
@@ -548,6 +548,10 @@ public:
|
||||
return Bits.ModuleDecl.IsMainModule;
|
||||
}
|
||||
|
||||
/// For the main module, retrieves the list of primary source files being
|
||||
/// compiled, that is, the files we're generating code for.
|
||||
ArrayRef<SourceFile *> getPrimarySourceFiles() const;
|
||||
|
||||
/// Retrieve the top-level module. If this module is already top-level, this
|
||||
/// returns itself. If this is a submodule such as \c Foo.Bar.Baz, this
|
||||
/// returns the module \c Foo.
|
||||
|
||||
Reference in New Issue
Block a user