xref: /minix3/external/bsd/llvm/dist/clang/test/Modules/dependency-gen.modulemap.cpp (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc // REQUIRES: shell
2*0a6a1f1dSLionel Sambuc //
3*0a6a1f1dSLionel Sambuc // RUN: cd %S
4*0a6a1f1dSLionel Sambuc // RUN: rm -f %t.cpm %t-base.pcm %t-base.d %t.d
5*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -I. -x c++ -fmodule-maps -fmodule-name=test-base -fno-modules-implicit-maps -fmodules -emit-module -fno-validate-pch -fmodules-strict-decluse Inputs/dependency-gen-base.modulemap -dependency-file %t-base.d -MT %t-base.pcm -o %t-base.pcm -fmodule-map-file-home-is-cwd
6*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -I. -x c++ -fmodule-maps -fmodule-name=test -fno-modules-implicit-maps -fmodules -emit-module -fno-validate-pch -fmodules-strict-decluse -fmodule-file=%t-base.pcm dependency-gen.modulemap.cpp -dependency-file %t.d -MT %t.pcm -o %t.pcm -fmodule-map-file-home-is-cwd
7*0a6a1f1dSLionel Sambuc // RUN: FileCheck %s < %t.d
8*0a6a1f1dSLionel Sambuc module "test" {
9*0a6a1f1dSLionel Sambuc   export *
10*0a6a1f1dSLionel Sambuc   header "Inputs/dependency-gen.h"
11*0a6a1f1dSLionel Sambuc   use "test-base"
12*0a6a1f1dSLionel Sambuc   use "test-base2"
13*0a6a1f1dSLionel Sambuc }
14*0a6a1f1dSLionel Sambuc extern module "test-base2" "Inputs/dependency-gen-base2.modulemap"
15*0a6a1f1dSLionel Sambuc extern module "test-base" "Inputs/dependency-gen-base.modulemap"
16*0a6a1f1dSLionel Sambuc 
17*0a6a1f1dSLionel Sambuc // CHECK: {{ |\./}}Inputs/dependency-gen-included2.h
18*0a6a1f1dSLionel Sambuc // CHECK: {{ |\./}}Inputs/dependency-gen-base.modulemap
19