File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed
test/SymbolGraph/ClangImporter Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -1542,6 +1542,8 @@ collectExportedImports(const ModuleDecl *topLevelModule,
1542
1542
stack.push_back (topLevelModule);
1543
1543
while (!stack.empty ()) {
1544
1544
const ModuleDecl *module = stack.pop_back_val ();
1545
+ if (module ->isNonSwiftModule ())
1546
+ continue ;
1545
1547
1546
1548
for (const FileUnit *file : module ->getFiles ()) {
1547
1549
if (const SourceFile *source = dyn_cast<SourceFile>(file)) {
Original file line number Diff line number Diff line change 1
1
// RUN: %empty-directory(%t)
2
+ // RUN: %empty-directory(%t1)
2
3
// RUN: cp -r %S/Inputs/ObjcProperty/ObjcProperty.framework %t
3
- // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -emit-module -o %t/ObjcProperty.framework/Modules/ObjcProperty.swiftmodule/%target-swiftmodule-name -import-underlying-module -F %t -module-name ObjcProperty -disable-objc-attr-requires-foundation-module %s
4
- // RUN: %target-swift-symbolgraph-extract -sdk %clang-importer-sdk -module-name ObjcProperty -F %t -output-dir %t -pretty-print -v
5
- // RUN: %FileCheck %s --input-file %t/ObjcProperty.symbols.json
6
- // RUN: %FileCheck %s --input-file %t/ObjcProperty.symbols.json --check-prefix XLANG
4
+ // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -emit-module -o %t/ObjcProperty.framework/Modules/ObjcProperty.swiftmodule/%target-swiftmodule-name -import-underlying-module -F %t -module-name ObjcProperty -disable-objc-attr-requires-foundation-module %s -emit-symbol-graph -emit-symbol-graph-dir %t
5
+ // RUN: %target-swift-symbolgraph-extract -sdk %clang-importer-sdk -module-name ObjcProperty -F %t -output-dir %t1 -pretty-print -v
6
+ // RUN: %validate-json %t/ObjcProperty.symbols.json %t/ObjcProperty.formatted.symbols.json
7
+ // RUN: %FileCheck %s --input-file %t/ObjcProperty.formatted.symbols.json
8
+ // RUN: %FileCheck %s --input-file %t/ObjcProperty.formatted.symbols.json --check-prefix XLANG
9
+ // RUN: %FileCheck %s --input-file %t1/ObjcProperty.symbols.json
10
+ // RUN: %FileCheck %s --input-file %t1/ObjcProperty.symbols.json --check-prefix XLANG
7
11
8
12
// REQUIRES: objc_interop
9
13
10
- import Foundation
11
-
12
14
public enum SwiftEnum { }
13
15
14
16
public class SwiftClass : Foo { }
15
17
18
+ // ensure we don't accidentaly pull in exported objc modules
19
+
20
+ // CHECK-NOT: "precise": "c:objc(cs)NSString"
21
+
16
22
// ensure that synthesized inherited objc symbols do not appear in the symbol graph
17
23
18
24
// CHECK-NOT: "c:objc(cs)NSObject(im)init"
You can’t perform that action at this time.
0 commit comments