@@ -213,7 +213,6 @@ PrintOptions PrintOptions::printSwiftInterfaceFile(ModuleDecl *ModuleToPrint,
213213 result.IsForSwiftInterface = true;
214214 result.PrintLongAttrsOnSeparateLines = true;
215215 result.TypeDefinitions = true;
216- result.PrintIfConfig = false;
217216 result.CurrentModule = ModuleToPrint;
218217 result.FullyQualifiedTypes = true;
219218 result.FullyQualifiedTypesIfAmbiguous = true;
@@ -2281,7 +2280,7 @@ bool ShouldPrintChecker::shouldPrint(const Decl *D,
22812280 }
22822281
22832282 if (isa<IfConfigDecl>(D)) {
2284- return Options.PrintIfConfig ;
2283+ return false ;
22852284 }
22862285
22872286 return true;
@@ -3360,21 +3359,7 @@ void PrintAST::visitTopLevelCodeDecl(TopLevelCodeDecl *decl) {
33603359}
33613360
33623361void PrintAST::visitIfConfigDecl(IfConfigDecl *ICD) {
3363- if (!Options.PrintIfConfig)
3364- return;
3365-
3366- for (auto &Clause : ICD->getClauses()) {
3367- if (&Clause == &*ICD->getClauses().begin())
3368- Printer << tok::pound_if << " /* condition */"; // FIXME: print condition
3369- else if (Clause.Cond)
3370- Printer << tok::pound_elseif << " /* condition */"; // FIXME: print condition
3371- else
3372- Printer << tok::pound_else;
3373- printASTNodes(Clause.Elements);
3374- Printer.printNewline();
3375- indent();
3376- }
3377- Printer << tok::pound_endif;
3362+ // Never printed
33783363}
33793364
33803365void PrintAST::visitPoundDiagnosticDecl(PoundDiagnosticDecl *PDD) {
@@ -5603,7 +5588,7 @@ bool Decl::shouldPrintInContext(const PrintOptions &PO) const {
56035588 }
56045589
56055590 if (isa<IfConfigDecl>(this)) {
5606- return PO.PrintIfConfig ;
5591+ return false ;
56075592 }
56085593
56095594 // Print everything else.
0 commit comments