File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ // RUN: %empty-directory(%t)
2
+
3
+ // Make a basic clang framework to import
4
+ //
5
+ // RUN: %empty-directory(%t/MySystemFramework.framework/Headers)
6
+ // RUN: %empty-directory(%t/MySystemFramework.framework/Modules)
7
+ // RUN: echo 'void someSystemFunc(int arg);' > %t/MySystemFramework.framework/Headers/MySystemFramework.h
8
+ // RUN: echo 'framework module MySystemFramework { umbrella header "MySystemFramework.h" export * }' > %t/MySystemFramework.framework/Modules/module.modulemap
9
+
10
+ import MySystemFramework
11
+ someSystemFunc ( 2 )
12
+
13
+ // Index this file with and without ignoring system frameworks
14
+ //
15
+ // RUN: %target-swiftc_driver -index-store-path %t/idx1 -o %t/file.o -Fsystem %t -typecheck %s
16
+ // RUN: %target-swiftc_driver -index-store-path %t/idx2 -o %t/file.o -index-ignore-system-modules -Fsystem %t -typecheck %s
17
+ // RUN: c-index-test core -print-unit %t/idx1 | %FileCheck --check-prefixes=ALLOWSYSTEM,BOTH %s
18
+ // RUN: c-index-test core -print-unit %t/idx2 | %FileCheck --check-prefixes=IGNORESYSTEM,BOTH %s
19
+
20
+ // We should always get a dependency on the system framework in the unit for this file's module.
21
+ //
22
+ // BOTH: DEPEND START
23
+ // BOTH: Unit | system | MySystemFramework |
24
+ // BOTH: DEPEND END
25
+
26
+ // We should get a unit for the system framework if not ignoring them.
27
+ //
28
+ // ALLOWSYSTEM: provider: clang
29
+ // ALLOWSYSTEM-NEXT: is-system: 1
30
+ // ALLOWSYSTEM-NEXT: is-module: 1
31
+ // ALLOWSYSTEM-NEXT: module-name: MySystemFramework
32
+
33
+ // But shouldn't if we are.
34
+ //
35
+ // IGNORESYSTEM-NOT: module-name: MySystemFramework
You can’t perform that action at this time.
0 commit comments