File tree Expand file tree Collapse file tree 3 files changed +25
-3
lines changed Expand file tree Collapse file tree 3 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,8 @@ class ImportSet final :
9898 return {getTrailingObjects<ImportedModule>(),
9999 NumTopLevelImports + NumTransitiveImports};
100100 }
101+
102+ SWIFT_DEBUG_DUMP;
101103};
102104
103105class alignas (ImportedModule) ImportCache {
Original file line number Diff line number Diff line change @@ -1320,9 +1320,11 @@ std::string ValueDecl::printRef() const {
13201320}
13211321
13221322void ValueDecl::dumpRef (raw_ostream &os) const {
1323- // Print the context.
1324- printContext (os, getDeclContext ());
1325- os << " ." ;
1323+ if (!isa<ModuleDecl>(this )) {
1324+ // Print the context.
1325+ printContext (os, getDeclContext ());
1326+ os << " ." ;
1327+ }
13261328
13271329 // Print name.
13281330 getName ().printPretty (os);
Original file line number Diff line number Diff line change @@ -63,6 +63,24 @@ void ImportSet::Profile(
6363 }
6464}
6565
66+ void ImportSet::dump () const {
67+ llvm::errs () << " HasHeaderImportModule: " << HasHeaderImportModule << " \n " ;
68+
69+ llvm::errs () << " TopLevelImports:" ;
70+ for (auto import : getTopLevelImports ()) {
71+ llvm::errs () << " \n - " ;
72+ simple_display (llvm::errs (), import );
73+ }
74+ llvm::errs () << " \n " ;
75+
76+ llvm::errs () << " TransitiveImports:" ;
77+ for (auto import : getTransitiveImports ()) {
78+ llvm::errs () << " \n - " ;
79+ simple_display (llvm::errs (), import );
80+ }
81+ llvm::errs () << " \n " ;
82+ }
83+
6684static void collectExports (ImportedModule next,
6785 SmallVectorImpl<ImportedModule> &stack) {
6886 SmallVector<ImportedModule, 4 > exports;
You can’t perform that action at this time.
0 commit comments