Skip to content

Commit c61641a

Browse files
committed
modify test
1 parent 4777ed3 commit c61641a

4 files changed

+18
-7
lines changed

clang/test/Modules/no-local-decl-in-reduced-bmi.cppm

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
//
77
// RUN: %clang_cc1 -std=c++20 %t/a.cppm -emit-reduced-module-interface -o %t/a.pcm
88
// 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
1010
//
1111
// RUN: %clang_cc1 -std=c++20 %t/b.cppm -emit-reduced-module-interface -o %t/b.pcm
1212
// 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
1414

1515
//--- a.cppm
1616
export module a;
@@ -19,6 +19,9 @@ export int func() {
1919
return 43;
2020
}
2121

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.
2225
// Test that the variable declaration is not recorded completely.
2326
// CHECK-NOT: <DECL_VAR
2427

@@ -29,5 +32,6 @@ export inline int func() {
2932
return v;
3033
}
3134

35+
//--- b.check
3236
// Check that we still records the declaration from inline functions.
3337
// CHECK: <DECL_VAR

clang/test/Modules/reduced-bmi-empty-module-purview-std.cppm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//
88
// RUN: %clang_cc1 -std=c++20 %t/A.cppm -emit-reduced-module-interface -o %t/A.pcm
99
// 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
1111

1212
//--- std.h
1313
namespace std {
@@ -22,6 +22,8 @@ module;
2222
#include "std.h"
2323
export module A;
2424

25+
26+
//--- A.check
2527
// CHECK-NOT: <DECL_NAMESPACE
2628
// CHECK-NOT: <DECL_CONTEXT_LEXICAL
2729
// CHECK-NOT: <DELAYED_NAMESPACE_LEXICAL_VISIBLE_RECORD

clang/test/Modules/reduced-bmi-empty-module-purview.cppm

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
// RUN: %clang_cc1 -std=c++20 %t/A.cppm -emit-reduced-module-interface -o %t/A.pcm \
1010
// RUN: -fmodule-file=M=%t/M.pcm
1111
// 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
1313
//
1414
// RUN: %clang_cc1 -std=c++20 %t/A1.cppm -emit-reduced-module-interface -o %t/A1.pcm \
1515
// RUN: -fmodule-file=M=%t/M.pcm
1616
// 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
1818

1919
//--- foo.h
2020
namespace ns {
@@ -82,6 +82,7 @@ module;
8282
export module A;
8383
import M;
8484

85+
//--- A.check
8586
// CHECK-NOT: <DECL_CXX_RECORD
8687
// CHECK-NOT: <DECL_UPDATE_OFFSETS
8788

@@ -91,6 +92,7 @@ import M;
9192
#include "foo.h"
9293
export module A;
9394

95+
//--- A1.check
9496
// CHECK-NOT: <DECL_CXX_RECORD
9597
// CHECK-NOT: <DECL_UPDATE_OFFSETS
9698

clang/test/Modules/unreached-static-entities.cppm

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33
//
44
// RUN: rm -rf %t
55
// RUN: mkdir -p %t
6+
// RUN: split-file %s %t
67
//
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
89
// 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
1011

12+
//--- S.cppm
1113
export module S;
1214
static int static_func() {
1315
return 43;
@@ -17,6 +19,7 @@ export int func() {
1719
return static_func();
1820
}
1921

22+
//--- S.check
2023
// CHECK: <DECL_FUNCTION
2124
// Checks that we won't see a second function
2225
// CHECK-NOT: <DECL_FUNCTION

0 commit comments

Comments
 (0)