File: module-fgen-reduced-bmi.cppm

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,998,520 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (51 lines) | stat: -rw-r--r-- 2,005 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// It is annoying to handle different slash direction
// in Windows and Linux. So we disable the test on Windows
// here.
// REQUIRES: !system-windows
// On AIX, the default output for `-c` may be `.s` instead of `.o`,
// which makes the test fail. So disable the test on AIX.
// UNSUPPORTED: system-aix
//
// RUN: rm -rf %t && split-file %s %t && cd %t
//
// RUN: %clang -std=c++20 Hello.cppm -fmodule-output=Hello.pcm \
// RUN:     -fexperimental-modules-reduced-bmi -c -o Hello.o -### 2>&1 | FileCheck Hello.cppm
//
// RUN: %clang -std=c++20 Hello.cppm \
// RUN:     -fexperimental-modules-reduced-bmi -c -o Hello.o -### 2>&1 | \
// RUN:         FileCheck Hello.cppm --check-prefix=CHECK-UNSPECIFIED
//
// RUN: %clang -std=c++20 Hello.cppm \
// RUN:     -fexperimental-modules-reduced-bmi -c -### 2>&1 | \
// RUN:         FileCheck Hello.cppm --check-prefix=CHECK-NO-O
//
// RUN: %clang -std=c++20 Hello.cppm \
// RUN:     -fexperimental-modules-reduced-bmi -c -o AnotherName.o -### 2>&1 | \
// RUN:         FileCheck Hello.cppm --check-prefix=CHECK-ANOTHER-NAME
//
// RUN: %clang -std=c++20 Hello.cppm --precompile -fexperimental-modules-reduced-bmi \
// RUN:     -o Hello.full.pcm -### 2>&1 | FileCheck Hello.cppm \
// RUN:     --check-prefix=CHECK-EMIT-MODULE-INTERFACE
//
// RUN: %clang -std=c++20 Hello.cc -fexperimental-modules-reduced-bmi -Wall -Werror \
// RUN:     -c -o Hello.o -### 2>&1 | FileCheck Hello.cc

//--- Hello.cppm
export module Hello;

// Test that we won't generate the emit-module-interface as 2 phase compilation model.
// CHECK-NOT: -emit-module-interface
// CHECK: "-fexperimental-modules-reduced-bmi"

// CHECK-UNSPECIFIED: -fmodule-output=Hello.pcm

// CHECK-NO-O: -fmodule-output=Hello.pcm
// CHECK-ANOTHER-NAME: -fmodule-output=AnotherName.pcm

// With `-emit-module-interface` specified, we should still see the `-emit-module-interface`
// flag.
// CHECK-EMIT-MODULE-INTERFACE: -emit-module-interface

//--- Hello.cc

// CHECK-NOT: "-fexperimental-modules-reduced-bmi"