brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.3 KiB · 00a3308 Raw
44 lines · plain
1// RUN: cd %S2// RUN: rm -rf %t3//4// RUN: %clang_cc1 -I. -x c++ -fmodule-name=test -fmodules -emit-module -fno-validate-pch -fmodules-strict-decluse %s -dependency-file - -MT implicit.pcm -o %t/implicit.pcm -fmodules-cache-path=%t -fmodule-map-file-home-is-cwd -fmodule-map-file=%S/Inputs/dependency-gen-base.modulemap | FileCheck %s --check-prefix=IMPLICIT5//6// RUN: %clang_cc1 -I. -x c++ -fmodule-name=test-base -fmodules -emit-module -fno-validate-pch -fmodules-strict-decluse Inputs/dependency-gen-base.modulemap -o %t/base.pcm -fmodule-map-file-home-is-cwd -fmodule-map-file=%S/Inputs/dependency-gen-base.modulemap7// RUN: %clang_cc1 -I. -x c++ -fmodule-name=test -fmodules -emit-module -fno-validate-pch -fmodules-strict-decluse -fmodule-file=%t/base.pcm %s -dependency-file - -MT explicit.pcm -o %t/explicit.pcm -fmodules-cache-path=%t -fmodule-map-file-home-is-cwd | FileCheck %s --check-prefix=EXPLICIT8//9// RUN: %clang_cc1 -I. -x c++ -fmodules -include Inputs/dependency-gen.h -x c++ /dev/null -fmodule-file=%t/explicit.pcm -MT main.o -fsyntax-only -dependency-file - | FileCheck %s --check-prefix=EXPLICIT-USE10module "test" {11  export *12  header "Inputs/dependency-gen.h"13  use "test-base"14  use "test-base2"15}16 17// For implicit use of a module via the module cache, the input files18// referenced by the .pcm are also dependencies of this build.19//20// IMPLICIT-DAG: {{[/\\]}}dependency-gen.modulemap21// IMPLICIT-DAG: {{ |\.[/\\]}}Inputs{{[/\\]}}dependency-gen-base.modulemap22// IMPLICIT-DAG: {{ |\.[/\\]}}Inputs{{[/\\]}}dependency-gen-base2.modulemap23// IMPLICIT-DAG: {{ |\.[/\\]}}Inputs{{[/\\]}}dependency-gen.h24// IMPLICIT-DAG: {{ |\.[/\\]}}Inputs{{[/\\]}}dependency-gen-included.h25// IMPLICIT-DAG: {{ |\.[/\\]}}Inputs{{[/\\]}}dependency-gen-included2.h26 27// For an explicit use of a module via -fmodule-file=, the other module maps28// and included headers are not dependencies of this target (they are instead29// dependencies of the explicitly-specified .pcm input).30//31// EXPLICIT: {{^}}explicit.pcm:32// EXPLICIT-NOT: dependency-gen-33// EXPLICIT: {{.*[/\\]}}dependency-gen.modulemap34// EXPLICIT-NOT: dependency-gen-35// EXPLICIT: base.pcm36// EXPLICIT-NOT: dependency-gen-37// EXPLICIT: {{ |\.[/\\]}}Inputs{{[/\\]}}dependency-gen.h38// EXPLICIT-NOT: dependency-gen-39 40// EXPLICIT-USE: main.o:41// EXPLICIT-USE-NOT: base.pcm42// EXPLICIT-USE: explicit.pcm43// EXPLICIT-USE-NOT: base.pcm44