brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · c8d1e6d Raw
55 lines · cpp
1// RUN: rm -rf %t2// RUN: mkdir -p %t3// RUN: split-file %s %t4// RUN: cd %t5 6// RUN: %clang_cc1 -std=c++20 -emit-header-unit -xc++-user-header hu-01.h \7// RUN:   -fmodule-name=hu-01 -o hu-01.pcm8 9// RUN: %clang_cc1 -std=c++20 -emit-header-unit -xc++-user-header hu-02.h \10// RUN:  -Wno-experimental-header-units -fmodule-file=hu-01.pcm -o hu-02-abs.pcm11 12// RUN: %clang_cc1 -std=c++20 -emit-header-unit -xc++-user-header hu-02.h \13// RUN:  -Wno-experimental-header-units -fmodule-file=hu-01.pcm -o hu-02-rel.pcm \14// RUN:  -fmodule-file-home-is-cwd15 16// RUN: %clang -module-file-info hu-02-abs.pcm | FileCheck %s --check-prefix=IMPORT-ABS -DPREFIX=%t17// IMPORT-ABS: Imports module 'hu-01': [[PREFIX]]{{/|\\}}hu-01.pcm18 19// RUN: %clang -module-file-info hu-02-rel.pcm | FileCheck %s --check-prefix=IMPORT-REL20// IMPORT-REL: Imports module 'hu-01': hu-01.pcm21 22// RUN: llvm-bcanalyzer --dump --disable-histogram %t/hu-02-abs.pcm \23// RUN:   | FileCheck %s --check-prefix=INPUT-ABS -DPREFIX=%t24// INPUT-ABS: <INPUT_FILE {{.*}}/> blob data = '[[PREFIX]]{{/|\\}}hu-02.h'25 26// RUN: llvm-bcanalyzer --dump --disable-histogram %t/hu-02-rel.pcm \27// RUN:   | FileCheck %s --check-prefix=INPUT-REL28// INPUT-REL: <INPUT_FILE {{.*}}/> blob data = 'hu-02.h'29 30//--- hu-01.h31inline void f() {}32 33//--- hu-02.h34import "hu-01.h";35 36inline void g() {37  f();38}39 40// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/a.cppm -o %t/a-abs.pcm41 42// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/a.cppm -o %t/a-rel.pcm \43// RUN:   -fmodule-file-home-is-cwd44 45// RUN: llvm-bcanalyzer --dump --disable-histogram %t/a-abs.pcm \46// RUN:   | FileCheck %s --check-prefix=M-INPUT-ABS -DPREFIX=%t47// M-INPUT-ABS: <INPUT_FILE {{.*}}/> blob data = '[[PREFIX]]{{/|\\}}a.cppm'48 49// RUN: llvm-bcanalyzer --dump --disable-histogram %t/a-rel.pcm \50// RUN:   | FileCheck %s --check-prefix=M-INPUT-REL51// M-INPUT-REL: <INPUT_FILE {{.*}}/> blob data = 'a.cppm'52 53//--- a.cppm54export module a;55