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 @@ -1540,6 +1540,8 @@ collectExportedImports(const ModuleDecl *topLevelModule,
15401540 stack.push_back (topLevelModule);
15411541 while (!stack.empty ()) {
15421542 const ModuleDecl *module = stack.pop_back_val ();
1543+ if (module ->isNonSwiftModule ())
1544+ continue ;
15431545
15441546 for (const FileUnit *file : module ->getFiles ()) {
15451547 if (const SourceFile *source = dyn_cast<SourceFile>(file)) {
Original file line number Diff line number Diff line change 11// RUN: %empty-directory(%t)
2+ // RUN: %empty-directory(%t1)
23// 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
711
812// REQUIRES: objc_interop
913
10- import Foundation
11-
1214public enum SwiftEnum { }
1315
1416public class SwiftClass : Foo { }
1517
18+ // ensure we don't accidentaly pull in exported objc modules
19+
20+ // CHECK-NOT: "precise": "c:objc(cs)NSString"
21+
1622// ensure that synthesized inherited objc symbols do not appear in the symbol graph
1723
1824// CHECK-NOT: "c:objc(cs)NSObject(im)init"
You can’t perform that action at this time.
0 commit comments