File tree Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ module mymod {
2
+ header "mymod.h"
3
+ }
Original file line number Diff line number Diff line change
1
+ void mymod_call_me (void );
Original file line number Diff line number Diff line change
1
+ // This test ensures a certain set of arguments allows both compiler and sourcekitd invocations to share the same module cache.
2
+ // NOTE: Do not change this test without a review from @akyrtzi
3
+
4
+ // REQUIRES: shell
5
+ // RUN: %empty-directory(%t)
6
+
7
+ // RUN: COMPILER_ARGS=( \
8
+ // RUN: -module-name themod \
9
+ // RUN: -module-cache-path %t/mcp \
10
+ // RUN: -sdk %sdk \
11
+ // RUN: -swift-version 5 \
12
+ // RUN: -I %S/Inputs/mymod \
13
+ // RUN: -Xfrontend -experimental-allow-module-with-compiler-errors \
14
+ // RUN: -Xcc -D__INDEX_BUILD__=1 -D__INDEX_BUILD__ \
15
+ // RUN: -Xcc -Xclang -Xcc -fallow-pcm-with-compiler-errors \
16
+ // RUN: -Xcc -Xclang -Xcc -fmodule-format=raw \
17
+ // RUN: -Xcc -Xclang -Xcc -detailed-preprocessing-record \
18
+ // RUN: %s \
19
+ // RUN: )
20
+
21
+ // RUN: %swiftc_driver -emit-module -emit-module-path themod.swiftmodule -Xfrontend -experimental-skip-all-function-bodies ${COMPILER_ARGS[@]}
22
+ // RUN: %swiftc_driver -index-file -index-file-path %s -index-store-path %t/idx -index-ignore-system-modules ${COMPILER_ARGS[@]}
23
+ // RUN: %sourcekitd-test -req=sema %s -- ${COMPILER_ARGS[@]}
24
+ // RUN: find %t/mcp -name "mymod-*.pcm" | count 1
25
+
26
+ import mymod
You can’t perform that action at this time.
0 commit comments