AST printing: when printing module interface, explode PatternBindingDecls

The exact pattern that was used to declare a variable is not important from the
module interface point of view.


Swift SVN r11231
This commit is contained in:
Dmitri Hrybenko
2013-12-13 02:19:04 +00:00
parent a1881434c2
commit 374aa1d57c
5 changed files with 45 additions and 33 deletions

View File

@@ -1120,17 +1120,13 @@ bool Module::walk(ASTWalker &Walker) {
// SourceFile Implementation
//===----------------------------------------------------------------------===//
void SourceFile::print(raw_ostream &os) {
print(os, PrintOptions::printEverything());
}
void SourceFile::print(raw_ostream &os, const PrintOptions &options) {
void SourceFile::print(raw_ostream &OS, const PrintOptions &PO) {
for (auto decl : Decls) {
if (!decl->shouldPrintInContext())
if (!decl->shouldPrintInContext(PO))
continue;
decl->print(os, options);
os << "\n";
decl->print(OS, PO);
OS << "\n";
}
}