summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-08-09 02:44:20 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-08-09 02:44:20 +0000
commit2d7fbbc7be6c78370d2d7cc37fe7a8277ac0ff10 (patch)
treefabe45888153f28c32b23543797fbda7857322b6 /clang/test/Modules
parent03f7e611c625de0b5509ee975ca01ff95525a7b6 (diff)
downloadbcm5719-llvm-2d7fbbc7be6c78370d2d7cc37fe7a8277ac0ff10.tar.gz
bcm5719-llvm-2d7fbbc7be6c78370d2d7cc37fe7a8277ac0ff10.zip
[modules] Don't leak -M flags for dependency file generation into the module
build process when we implicitly build a module. Previously, we'd create the specified .d file once for each implicitly-built module and then finally overwrite it with the correct contents after the requested build completes. (This fails if you use stdout as a dependency file, which is what the provided testcase does, and is how I discovered this brokenness.) llvm-svn: 244412
Diffstat (limited to 'clang/test/Modules')
-rw-r--r--clang/test/Modules/dependency-gen.modulemap9
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/test/Modules/dependency-gen.modulemap b/clang/test/Modules/dependency-gen.modulemap
index 5232c0fcdf1..66ee94cc25e 100644
--- a/clang/test/Modules/dependency-gen.modulemap
+++ b/clang/test/Modules/dependency-gen.modulemap
@@ -1,7 +1,10 @@
// RUN: cd %S
-// RUN: rm -f %t.cpm %t-base.pcm %t-base.d %t.d
-// RUN: %clang_cc1 -I. -x c++ -fmodule-name=test-base -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
-// 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 %t.d -MT %t.pcm -o %t.pcm -fmodules-cache-path=%t -fmodule-map-file-home-is-cwd
+// 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
+//
+// 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 -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
// RUN: FileCheck %s < %t.d
module "test" {
export *
OpenPOWER on IntegriCloud