Skip to content

Commit b543060

Browse files
committed
Provide a more useful cross-import submodule test
Removes an unreliable performance-based submodule skipping test and replaces it with a test that checks for a related functional trait instead.
1 parent a3e3598 commit b543060

File tree

6 files changed

+19
-22
lines changed

6 files changed

+19
-22
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
%YAML 1.2
2+
---
3+
version: 1
4+
modules:
5+
- name: _NeverImportedOverlay
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
#include "clang_library_submodule.h"
12
void fromClangLibrary();
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
void fromClangLibrarySubmodule();
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
module ClangLibrary { header "clang_library.h" }
1+
module ClangLibrary {
2+
header "clang_library.h"
3+
module Submodule {
4+
header "clang_library_submodule.h"
5+
}
6+
}

test/CrossImport/loading.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
// RUN: %target-typecheck-verify-swift -enable-cross-import-overlays -I %t/include -I %t/lib/swift -F %t/Frameworks -DTHIN_LIBRARY -emit-dependencies-path - | %FileCheck -check-prefixes=DEPS,DEPS-MOST -DMODULE=ThinLibrary -DTARGET=%module-target-triple %s
2424
// RUN: %target-typecheck-verify-swift -enable-cross-import-overlays -I %t/include -I %t/lib/swift -F %t/Frameworks -DFAT_LIBRARY -emit-dependencies-path - | %FileCheck -check-prefixes=DEPS,DEPS-MOST -DMODULE=FatLibrary -DTARGET=%module-target-triple %s
2525
// RUN: %target-typecheck-verify-swift -enable-cross-import-overlays -I %t/include -I %t/lib/swift -F %t/Frameworks -DCLANG_LIBRARY -emit-dependencies-path - | %FileCheck -check-prefixes=DEPS,DEPS-MOST -DMODULE=ClangLibrary -DTARGET=%module-target-triple %s
26+
// RUN: %target-typecheck-verify-swift -enable-cross-import-overlays -I %t/include -I %t/lib/swift -F %t/Frameworks -DCLANG_LIBRARY_SUBMODULE -emit-dependencies-path - | %FileCheck -check-prefixes=DEPS,DEPS-MOST -DMODULE=ClangLibrary -DTARGET=%module-target-triple %s
2627
// RUN: %target-typecheck-verify-swift -enable-cross-import-overlays -I %t/include -I %t/lib/swift -F %t/Frameworks -DSWIFT_FRAMEWORK -emit-dependencies-path - | %FileCheck -check-prefixes=DEPS,DEPS-MOST -DMODULE=SwiftFramework -DTARGET=%module-target-triple %s
2728
// RUN: %target-typecheck-verify-swift -enable-cross-import-overlays -I %t/include -I %t/lib/swift -F %t/Frameworks -DCLANG_FRAMEWORK -emit-dependencies-path - | %FileCheck -check-prefixes=DEPS,DEPS-MOST -DMODULE=ClangFramework -DTARGET=%module-target-triple %s
2829
// RUN: %target-typecheck-verify-swift -enable-cross-import-overlays -I %t/include -I %t/lib/swift -F %t/Frameworks -DOVERLAID_CLANG_FRAMEWORK -emit-dependencies-path - | %FileCheck -check-prefix=DEPS -DMODULE=OverlaidClangFramework -DTARGET=%module-target-triple %s
@@ -35,6 +36,7 @@
3536
// RUN: not %target-typecheck-verify-swift -enable-cross-import-overlays -I %t/include -I %t/lib/swift -F %t/Frameworks -DDONT_ALWAYS_IMPORT -DTHIN_LIBRARY 2>/dev/null
3637
// RUN: not %target-typecheck-verify-swift -enable-cross-import-overlays -I %t/include -I %t/lib/swift -F %t/Frameworks -DDONT_ALWAYS_IMPORT -DFAT_LIBRARY 2>/dev/null
3738
// RUN: not %target-typecheck-verify-swift -enable-cross-import-overlays -I %t/include -I %t/lib/swift -F %t/Frameworks -DDONT_ALWAYS_IMPORT -DCLANG_LIBRARY 2>/dev/null
39+
// RUN: not %target-typecheck-verify-swift -enable-cross-import-overlays -I %t/include -I %t/lib/swift -F %t/Frameworks -DDONT_ALWAYS_IMPORT -DCLANG_LIBRARY_SUBMODULE 2>/dev/null
3840
// RUN: not %target-typecheck-verify-swift -enable-cross-import-overlays -I %t/include -I %t/lib/swift -F %t/Frameworks -DDONT_ALWAYS_IMPORT -DSWIFT_FRAMEWORK 2>/dev/null
3941
// RUN: not %target-typecheck-verify-swift -enable-cross-import-overlays -I %t/include -I %t/lib/swift -F %t/Frameworks -DDONT_ALWAYS_IMPORT -DCLANG_FRAMEWORK 2>/dev/null
4042
// RUN: not %target-typecheck-verify-swift -enable-cross-import-overlays -I %t/include -I %t/lib/swift -F %t/Frameworks -DDONT_ALWAYS_IMPORT -DOVERLAID_CLANG_FRAMEWORK 2>/dev/null
@@ -108,6 +110,10 @@ import FatLibrary
108110
import ClangLibrary
109111
#endif
110112

113+
#if CLANG_LIBRARY_SUBMODULE
114+
import ClangLibrary.Submodule
115+
#endif
116+
111117
#if SWIFT_FRAMEWORK
112118
import SwiftFramework
113119
#endif

test/CrossImport/skip-submodules.swift

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)