Skip to content

Commit a038f7d

Browse files
committed
AST: Handle PoundDiagnosticDecl in DeclExportabilityVisitor.
1 parent 9444534 commit a038f7d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

include/swift/AST/DeclExportabilityVisitor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ class DeclExportabilityVisitor
150150
}
151151
UNREACHABLE(Module);
152152
UNREACHABLE(TopLevelCode);
153-
UNREACHABLE(PoundDiagnostic);
154153
UNREACHABLE(Missing);
155154
UNREACHABLE(MissingMember);
156155
UNREACHABLE(GenericTypeParam);
@@ -168,6 +167,7 @@ class DeclExportabilityVisitor
168167
bool visit##KIND##Decl(const KIND##Decl *D) { return true; }
169168
UNINTERESTING(IfConfig);
170169
UNINTERESTING(Import);
170+
UNINTERESTING(PoundDiagnostic);
171171
UNINTERESTING(PrecedenceGroup);
172172
UNINTERESTING(EnumCase);
173173
UNINTERESTING(Operator);

test/SILGen/skip_non_exportable_decls.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
import Swift
66

7+
#warning("!")
8+
79
// CHECK-NO-SKIP: sil_global private @$s4Test17internalGlobalVar_Wz : $Builtin.Word
810
// CHECK-SKIP-NOT: s4Test17internalGlobalVar_Wz
911

0 commit comments

Comments
 (0)