File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ class DeclExportabilityVisitor
127
127
#define DEFAULT_TO_ACCESS_LEVEL (KIND ) \
128
128
bool visit##KIND##Decl(const KIND##Decl *D) { \
129
129
static_assert (std::is_convertible<KIND##Decl *, ValueDecl *>::value, \
130
- " ## KIND## Decl must be a ValueDecl" ); \
130
+ # KIND " Decl must be a ValueDecl" ); \
131
131
return false ; \
132
132
}
133
133
DEFAULT_TO_ACCESS_LEVEL (NominalType);
@@ -145,12 +145,11 @@ class DeclExportabilityVisitor
145
145
// exportability queries.
146
146
#define UNREACHABLE (KIND ) \
147
147
bool visit##KIND##Decl(const KIND##Decl *D) { \
148
- llvm_unreachable (" unexpected decl kind " ); \
148
+ llvm_unreachable (" unexpected " #KIND " Decl " ); \
149
149
return true ; \
150
150
}
151
151
UNREACHABLE (Module);
152
152
UNREACHABLE (TopLevelCode);
153
- UNREACHABLE (Import);
154
153
UNREACHABLE (PoundDiagnostic);
155
154
UNREACHABLE (Missing);
156
155
UNREACHABLE (MissingMember);
@@ -169,6 +168,7 @@ class DeclExportabilityVisitor
169
168
#define UNINTERESTING (KIND ) \
170
169
bool visit##KIND##Decl(const KIND##Decl *D) { return true ; }
171
170
UNINTERESTING (IfConfig);
171
+ UNINTERESTING (Import);
172
172
UNINTERESTING (PrecedenceGroup);
173
173
UNINTERESTING (EnumCase);
174
174
UNINTERESTING (Operator);
Original file line number Diff line number Diff line change 2
2
// RUN: %target-swift-frontend -emit-silgen %s -parse-as-library -module-name Test | %FileCheck %s --check-prefixes=CHECK,CHECK-NO-SKIP
3
3
// RUN: %target-swift-frontend -emit-silgen %s -parse-as-library -module-name Test -experimental-skip-non-exportable-decls | %FileCheck %s --check-prefixes=CHECK,CHECK-SKIP
4
4
5
+ import Swift
6
+
5
7
// CHECK-NO-SKIP: sil private{{.*}} @$s4Test11privateFunc33_E3F0E1C7B46D05C8067CB98677DE566CLLyyF : $@convention(thin) () -> () {
6
8
// CHECK-SKIP-NOT: s4Test11privateFunc33_E3F0E1C7B46D05C8067CB98677DE566CLLyyF
7
9
private func privateFunc( ) { }
You can’t perform that action at this time.
0 commit comments