File tree 7 files changed +128
-0
lines changed 7 files changed +128
-0
lines changed Original file line number Diff line number Diff line change
1
+ module "another_lib" {
2
+ export *
3
+ module "module_reproducer/another_lib.h" {
4
+ export *
5
+ header "module_reproducer/another_lib.h"
6
+ }
7
+ }
Original file line number Diff line number Diff line change
1
+ #ifndef ANOTHER_LIB_H_
2
+ #define ANOTHER_LIB_H_
3
+
4
+ #include " module_reproducer/deb_lib.h"
5
+
6
+ namespace f {
7
+
8
+ template <typename T>
9
+ std::vector<T> A () {
10
+ return std::vector<T>{};
11
+ }
12
+ } // namespace f
13
+ #endif // ANOTHER_LIB_H_
Original file line number Diff line number Diff line change
1
+ module "another_lib2" {
2
+ export *
3
+ module "module_reproducer/another_lib.h" {
4
+ export *
5
+ header "module_reproducer/another_lib.h"
6
+ }
7
+ }
Original file line number Diff line number Diff line change
1
+ CLANG_BIN=/usr/local/google/home/usx/build/bin/clang++ \
2
+ DEB_LIB_PCM=$( mktemp) \
3
+ ANOTHER_LIB_PCM=$( mktemp) \
4
+ ANOTHER_LIB_PCM2=$( mktemp) \
5
+ && \
6
+ ${CLANG_BIN} \
7
+ -fno-exceptions \
8
+ -funsigned-char \
9
+ -fnew-alignment=8 \
10
+ -fcoro-aligned-allocation \
11
+ -fmodule-name=deb_lib \
12
+ -Xclang=-fmodule-map-file-home-is-cwd \
13
+ -xc++ \
14
+ -Xclang=-emit-module \
15
+ -pthread \
16
+ -std=gnu++20 \
17
+ -c \
18
+ module_reproducer/deb_lib.cppmap \
19
+ -o \
20
+ ${DEB_LIB_PCM} \
21
+ && \
22
+ ${CLANG_BIN} \
23
+ -iquote \
24
+ . \
25
+ -fno-exceptions \
26
+ -funsigned-char \
27
+ -fnew-alignment=8 \
28
+ -fcoro-aligned-allocation \
29
+ -fmodule-name=another_lib \
30
+ -Xclang=-fmodule-map-file-home-is-cwd \
31
+ -xc++ \
32
+ -Xclang=-emit-module \
33
+ -Xclang=-fmodule-file=${DEB_LIB_PCM} \
34
+ -pthread \
35
+ -std=gnu++20 \
36
+ -c \
37
+ module_reproducer/another_lib.cppmap \
38
+ -o \
39
+ ${ANOTHER_LIB_PCM} \
40
+ && \
41
+ ${CLANG_BIN} \
42
+ -iquote \
43
+ . \
44
+ -fno-exceptions \
45
+ -funsigned-char \
46
+ -fnew-alignment=8 \
47
+ -fcoro-aligned-allocation \
48
+ -fmodule-name=another_lib2 \
49
+ -Xclang=-fmodule-map-file-home-is-cwd \
50
+ -xc++ \
51
+ -Xclang=-emit-module \
52
+ -Xclang=-fmodule-file=${ANOTHER_LIB_PCM} \
53
+ -pthread \
54
+ -std=gnu++20 \
55
+ -c \
56
+ module_reproducer/another_lib2.cppmap \
57
+ -o \
58
+ ${ANOTHER_LIB_PCM2} \
59
+ && \
60
+ ${CLANG_BIN} \
61
+ -iquote \
62
+ . \
63
+ -fno-exceptions \
64
+ -funsigned-char \
65
+ -fnew-alignment=8 \
66
+ -fcoro-aligned-allocation \
67
+ -Xclang=-fmodule-file=${ANOTHER_LIB_PCM2} \
68
+ -pthread \
69
+ -std=gnu++20 \
70
+ module_reproducer/test_lib.cc
Original file line number Diff line number Diff line change
1
+ module "deb_lib" {
2
+ export *
3
+ module "module_reproducer/deb_lib.h" {
4
+ export *
5
+ header "module_reproducer/deb_lib.h"
6
+ }
7
+ }
Original file line number Diff line number Diff line change
1
+ #ifndef DEB_LIB_H_
2
+ #define DEB_LIB_H_
3
+
4
+ #include < vector>
5
+ #include < string>
6
+
7
+ namespace f {
8
+ template <typename T>
9
+ std::vector<T> A ();
10
+
11
+ template <typename T>
12
+ class C {
13
+ template <typename V>
14
+ friend std::vector<V> A ();
15
+ };
16
+
17
+ C<std::string> c;
18
+ } // namespace f
19
+ #endif // DEB_LIB_H_
Original file line number Diff line number Diff line change
1
+ #include " module_reproducer/another_lib.h"
2
+
3
+ void momo () {
4
+ f::A<int >();
5
+ }
You can’t perform that action at this time.
0 commit comments