Skip to content

Commit fa1860c

Browse files
committed
Merge remote-tracking branch 'origin/main' into rebranch
2 parents 8d98a3e + 3b093d7 commit fa1860c

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

lib/AST/Module.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1542,6 +1542,8 @@ collectExportedImports(const ModuleDecl *topLevelModule,
15421542
stack.push_back(topLevelModule);
15431543
while (!stack.empty()) {
15441544
const ModuleDecl *module = stack.pop_back_val();
1545+
if (module->isNonSwiftModule())
1546+
continue;
15451547

15461548
for (const FileUnit *file : module->getFiles()) {
15471549
if (const SourceFile *source = dyn_cast<SourceFile>(file)) {

test/SymbolGraph/ClangImporter/ObjcProperty.swift

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
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-
1214
public enum SwiftEnum {}
1315

1416
public 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"

0 commit comments

Comments
 (0)