mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add support for :print_module on Clang modules.
This isn't very efficient: it scans every decl in the Clang TU (forcing deserialization) and filters based on the decl's enclosing module. Moreover, since getClangModuleForDecl() currently only handles top-level modules, all submodules get implicitly added to the top-level module... and will /not/ match an explicit submodule request. (This is probably close to the behavior we actually want: include decls that are from modules that are (a) submodules and (b) re-exported by the top-level module. We do want that extra check, though, and we would want to find things specifically by submodule.) Swift SVN r7602
This commit is contained in:
@@ -641,6 +641,9 @@ void ModuleFile::getLinkLibraries(Module::LinkLibraryCallback callback) const {
|
||||
}
|
||||
|
||||
void ModuleFile::getDisplayDecls(SmallVectorImpl<Decl *> &results) {
|
||||
if (ShadowedModule)
|
||||
ShadowedModule->getDisplayDecls(results);
|
||||
|
||||
if (OperatorDecls) {
|
||||
for (auto entry : make_range(OperatorDecls->data_begin(),
|
||||
OperatorDecls->data_end())) {
|
||||
|
||||
Reference in New Issue
Block a user