summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-08-13 17:57:10 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-08-13 17:57:10 +0000
commit216a3bd70de7f92397371f8d9c8f42683b8ecb19 (patch)
tree8c5e9d33b56b36a8209d5e71e95a06648ad13595 /clang/test/Modules
parent6cf4a6ba9b3fb7d0b2eab26c35146b5ab3c3c8be (diff)
downloadbcm5719-llvm-216a3bd70de7f92397371f8d9c8f42683b8ecb19.tar.gz
bcm5719-llvm-216a3bd70de7f92397371f8d9c8f42683b8ecb19.zip
[modules] Change the way we deal with .d output for explicitly-specified module
files: include the .pcm file itself in the .d output, rather than including its own input files. Other forms of module file continue to be transparent for .d output. Arguably, the input files for the .pcm file are still inputs to the compilation, but that's unnecessary for make-like build systems (where the mtime of the .pcm file is sufficient) and harmful for smarter build systems that know about module files and want to track only the local dependencies. llvm-svn: 244923
Diffstat (limited to 'clang/test/Modules')
-rw-r--r--clang/test/Modules/dependency-gen.modulemap21
1 files changed, 7 insertions, 14 deletions
diff --git a/clang/test/Modules/dependency-gen.modulemap b/clang/test/Modules/dependency-gen.modulemap
index ed9f19c31e3..fcd32a4f493 100644
--- a/clang/test/Modules/dependency-gen.modulemap
+++ b/clang/test/Modules/dependency-gen.modulemap
@@ -1,9 +1,9 @@
// RUN: cd %S
// RUN: rm -rf %t
//
-// 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 | FileCheck %s --check-prefix=IMPLICIT
+// 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=IMPLICIT
//
-// 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
+// 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.modulemap
// 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=EXPLICIT
module "test" {
export *
@@ -11,8 +11,6 @@ module "test" {
use "test-base"
use "test-base2"
}
-extern module "test-base2" "Inputs/dependency-gen-base2.modulemap"
-extern module "test-base" "Inputs/dependency-gen-base.modulemap"
// For implicit use of a module via the module cache, the input files
// referenced by the .pcm are also dependencies of this build.
@@ -28,16 +26,11 @@ extern module "test-base" "Inputs/dependency-gen-base.modulemap"
// and included headers are not dependencies of this target (they are instead
// dependencies of the explicitly-specified .pcm input).
//
-// FIXME: We should avoid loading the other referenced module maps (we already
-// have a parsed copy of their contents from the .pcm file) and thus not list
-// them here.
-//
-// FIXME: We should list a dependency on the explicitly specified .pcm files
-// (whether or not -module-file-deps is specified on the command line).
-//
-// EXPLICIT-FIXME-NOT: dependency-gen-
-// EXPLICIT-FIXME: {{.*}}/base.pcm
-//
// EXPLICIT: {{^}}explicit.pcm:
+// EXPLICIT-NOT: dependency-gen-
+// EXPLICIT: base.pcm
+// EXPLICIT-NOT: dependency-gen-
// EXPLICIT: {{.*[/\\]}}dependency-gen.modulemap
+// EXPLICIT-NOT: dependency-gen-
// EXPLICIT: {{ |\.[/\\]}}Inputs{{[/\\]}}dependency-gen.h
+// EXPLICIT-NOT: dependency-gen-
OpenPOWER on IntegriCloud