mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Module interface printing: don't print declarations from the Swift overlay when printing a submodule
rdar://16559404 Swift SVN r16117
This commit is contained in:
@@ -154,7 +154,10 @@ void swift::ide::printSubmoduleInterface(
|
||||
}
|
||||
continue;
|
||||
}
|
||||
SwiftDecls.push_back(D);
|
||||
if (FullModuleName.empty()) {
|
||||
// Add Swift decls if we are printing the top-level module.
|
||||
SwiftDecls.push_back(D);
|
||||
}
|
||||
}
|
||||
|
||||
auto &ClangSourceManager = Importer.getClangASTContext().getSourceManager();
|
||||
@@ -163,8 +166,7 @@ void swift::ide::printSubmoduleInterface(
|
||||
for (auto &P : ClangDecls) {
|
||||
std::sort(P.second.begin(), P.second.end(),
|
||||
[&](std::pair<Decl *, clang::SourceLocation> LHS,
|
||||
std::pair<Decl *, clang::SourceLocation> RHS)
|
||||
-> bool {
|
||||
std::pair<Decl *, clang::SourceLocation> RHS) -> bool {
|
||||
return ClangSourceManager.isBeforeInTranslationUnit(LHS.second,
|
||||
RHS.second);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user