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 :
98
98
return {getTrailingObjects<ImportedModule>(),
99
99
NumTopLevelImports + NumTransitiveImports};
100
100
}
101
+
102
+ SWIFT_DEBUG_DUMP;
101
103
};
102
104
103
105
class alignas (ImportedModule) ImportCache {
Original file line number Diff line number Diff line change @@ -1320,9 +1320,11 @@ std::string ValueDecl::printRef() const {
1320
1320
}
1321
1321
1322
1322
void 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
+ }
1326
1328
1327
1329
// Print name.
1328
1330
getName ().printPretty (os);
Original file line number Diff line number Diff line change @@ -63,6 +63,24 @@ void ImportSet::Profile(
63
63
}
64
64
}
65
65
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
+
66
84
static void collectExports (ImportedModule next,
67
85
SmallVectorImpl<ImportedModule> &stack) {
68
86
SmallVector<ImportedModule, 4 > exports;
You can’t perform that action at this time.
0 commit comments