@@ -213,7 +213,6 @@ PrintOptions PrintOptions::printSwiftInterfaceFile(ModuleDecl *ModuleToPrint,
213
213
result.IsForSwiftInterface = true ;
214
214
result.PrintLongAttrsOnSeparateLines = true ;
215
215
result.TypeDefinitions = true ;
216
- result.PrintIfConfig = false ;
217
216
result.CurrentModule = ModuleToPrint;
218
217
result.FullyQualifiedTypes = true ;
219
218
result.FullyQualifiedTypesIfAmbiguous = true ;
@@ -2281,7 +2280,7 @@ bool ShouldPrintChecker::shouldPrint(const Decl *D,
2281
2280
}
2282
2281
2283
2282
if (isa<IfConfigDecl>(D)) {
2284
- return Options. PrintIfConfig ;
2283
+ return false ;
2285
2284
}
2286
2285
2287
2286
return true ;
@@ -3360,21 +3359,7 @@ void PrintAST::visitTopLevelCodeDecl(TopLevelCodeDecl *decl) {
3360
3359
}
3361
3360
3362
3361
void 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
3378
3363
}
3379
3364
3380
3365
void PrintAST::visitPoundDiagnosticDecl (PoundDiagnosticDecl *PDD) {
@@ -5603,7 +5588,7 @@ bool Decl::shouldPrintInContext(const PrintOptions &PO) const {
5603
5588
}
5604
5589
5605
5590
if (isa<IfConfigDecl>(this )) {
5606
- return PO. PrintIfConfig ;
5591
+ return false ;
5607
5592
}
5608
5593
5609
5594
// Print everything else.
0 commit comments