File tree 4 files changed +18
-7
lines changed
4 files changed +18
-7
lines changed Original file line number Diff line number Diff line change 6
6
//
7
7
// RUN: %clang_cc1 -std=c++20 %t/a.cppm -emit-reduced-module-interface -o %t/a.pcm
8
8
// RUN: llvm-bcanalyzer --dump --disable-histogram --show-binary-blobs %t/a.pcm > %t/a.dump
9
- // RUN: cat %t/a.dump | FileCheck %t/a.cppm
9
+ // RUN: cat %t/a.dump | FileCheck %t/a.check
10
10
//
11
11
// RUN: %clang_cc1 -std=c++20 %t/b.cppm -emit-reduced-module-interface -o %t/b.pcm
12
12
// RUN: llvm-bcanalyzer --dump --disable-histogram --show-binary-blobs %t/b.pcm > %t/b.dump
13
- // RUN: cat %t/b.dump | FileCheck %t/b.cppm
13
+ // RUN: cat %t/b.dump | FileCheck %t/b.check
14
14
15
15
// --- a.cppm
16
16
export module a;
@@ -19,6 +19,9 @@ export int func() {
19
19
return 43 ;
20
20
}
21
21
22
+ // --- a.check
23
+ // Use a standalone check file since now we're going to embed all source files in the BMI
24
+ // so we will check the `CHECK-NOT: <DECL_VAR` in the source file otherwise.
22
25
// Test that the variable declaration is not recorded completely.
23
26
// CHECK-NOT: <DECL_VAR
24
27
@@ -29,5 +32,6 @@ export inline int func() {
29
32
return v;
30
33
}
31
34
35
+ // --- b.check
32
36
// Check that we still records the declaration from inline functions.
33
37
// CHECK: <DECL_VAR
Original file line number Diff line number Diff line change 7
7
//
8
8
// RUN: %clang_cc1 -std=c++20 %t/A.cppm -emit-reduced-module-interface -o %t/A.pcm
9
9
// RUN: llvm-bcanalyzer --dump --disable-histogram --show-binary-blobs %t/A.pcm > %t/A.dump
10
- // RUN: cat %t/A.dump | FileCheck %t/A.cppm
10
+ // RUN: cat %t/A.dump | FileCheck %t/A.check
11
11
12
12
// --- std.h
13
13
namespace std {
@@ -22,6 +22,8 @@ module;
22
22
#include " std.h"
23
23
export module A;
24
24
25
+
26
+ // --- A.check
25
27
// CHECK-NOT: <DECL_NAMESPACE
26
28
// CHECK-NOT: <DECL_CONTEXT_LEXICAL
27
29
// CHECK-NOT: <DELAYED_NAMESPACE_LEXICAL_VISIBLE_RECORD
Original file line number Diff line number Diff line change 9
9
// RUN: %clang_cc1 -std=c++20 %t/A.cppm -emit-reduced-module-interface -o %t/A.pcm \
10
10
// RUN: -fmodule-file=M=%t/M.pcm
11
11
// RUN: llvm-bcanalyzer --dump --disable-histogram --show-binary-blobs %t/A.pcm > %t/A.dump
12
- // RUN: cat %t/A.dump | FileCheck %t/A.cppm
12
+ // RUN: cat %t/A.dump | FileCheck %t/A.check
13
13
//
14
14
// RUN: %clang_cc1 -std=c++20 %t/A1.cppm -emit-reduced-module-interface -o %t/A1.pcm \
15
15
// RUN: -fmodule-file=M=%t/M.pcm
16
16
// RUN: llvm-bcanalyzer --dump --disable-histogram --show-binary-blobs %t/A1.pcm > %t/A1.dump
17
- // RUN: cat %t/A1.dump | FileCheck %t/A1.cppm
17
+ // RUN: cat %t/A1.dump | FileCheck %t/A1.check
18
18
19
19
// --- foo.h
20
20
namespace ns {
@@ -82,6 +82,7 @@ module;
82
82
export module A;
83
83
import M;
84
84
85
+ // --- A.check
85
86
// CHECK-NOT: <DECL_CXX_RECORD
86
87
// CHECK-NOT: <DECL_UPDATE_OFFSETS
87
88
@@ -91,6 +92,7 @@ import M;
91
92
#include " foo.h"
92
93
export module A;
93
94
95
+ // --- A1.check
94
96
// CHECK-NOT: <DECL_CXX_RECORD
95
97
// CHECK-NOT: <DECL_UPDATE_OFFSETS
96
98
Original file line number Diff line number Diff line change 3
3
//
4
4
// RUN: rm -rf %t
5
5
// RUN: mkdir -p %t
6
+ // RUN: split-file %s %t
6
7
//
7
- // RUN: %clang_cc1 -std=c++20 %s -emit-reduced-module-interface -o %t/S.pcm
8
+ // RUN: %clang_cc1 -std=c++20 %t/S.cppm -emit-reduced-module-interface -o %t/S.pcm
8
9
// RUN: llvm-bcanalyzer --dump --disable-histogram --show-binary-blobs %t/S.pcm > %t/S.dump
9
- // RUN: cat %t/S.dump | FileCheck %s
10
+ // RUN: cat %t/S.dump | FileCheck %t/S.check
10
11
12
+ // --- S.cppm
11
13
export module S;
12
14
static int static_func () {
13
15
return 43 ;
@@ -17,6 +19,7 @@ export int func() {
17
19
return static_func ();
18
20
}
19
21
22
+ // --- S.check
20
23
// CHECK: <DECL_FUNCTION
21
24
// Checks that we won't see a second function
22
25
// CHECK-NOT: <DECL_FUNCTION
You can’t perform that action at this time.
0 commit comments