diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-08-13 23:47:44 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-08-13 23:47:44 +0000 |
commit | f7b41371d9ede1aecf0930e5bd4a463519264633 (patch) | |
tree | ded8cb90f77507d5e88941ec46ff0b95c5161fb9 /clang/test/Modules/relative-dep-gen.cpp | |
parent | d7be603ab1a2fc9deac68328732355bb9d409bf9 (diff) | |
download | bcm5719-llvm-f7b41371d9ede1aecf0930e5bd4a463519264633.tar.gz bcm5719-llvm-f7b41371d9ede1aecf0930e5bd4a463519264633.zip |
[modules] When writing a module file built with -fmodule-map-file-home-is-cwd,
via a module map found by -fmodule-map-file=, the home directory of the module
is the current working directory, even if that's a different directory on
reload.
llvm-svn: 244988
Diffstat (limited to 'clang/test/Modules/relative-dep-gen.cpp')
-rw-r--r-- | clang/test/Modules/relative-dep-gen.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/clang/test/Modules/relative-dep-gen.cpp b/clang/test/Modules/relative-dep-gen.cpp index 1c728a9906f..e58dd6eb359 100644 --- a/clang/test/Modules/relative-dep-gen.cpp +++ b/clang/test/Modules/relative-dep-gen.cpp @@ -17,14 +17,22 @@ // RUN: FileCheck --check-prefix=CHECK-BUILD %s < %t/build-cwd.d // RUN: FileCheck --check-prefix=CHECK-USE %s < %t/use-explicit-cwd.d // RUN: FileCheck --check-prefix=CHECK-USE %s < %t/use-implicit-cwd.d +// +// Check that the .d file is still correct after relocating the module. +// RUN: mkdir %t/Inputs +// RUN: cp %S/Inputs/relative-dep-gen-1.h %t/Inputs +// RUN: cp %s %t +// RUN: cd %t +// RUN: %clang_cc1 -cc1 -fno-implicit-modules -fmodule-file=%t/mod-cwd.pcm -dependency-file %t/use-explicit-no-map-cwd.d -MT use.o relative-dep-gen.cpp -fsyntax-only -fmodule-map-file-home-is-cwd +// RUN: cat %t/use-explicit-no-map-cwd.d +// RUN: FileCheck --check-prefix=CHECK-USE %s < %t/use-explicit-no-map-cwd.d #include "Inputs/relative-dep-gen-1.h" // CHECK-BUILD: mod.pcm: -// CHECK-BUILD: Inputs/relative-dep-gen{{(-cwd)?}}.modulemap -// CHECK-BUILD: Inputs/relative-dep-gen-1.h -// CHECK-BUILD: Inputs/relative-dep-gen-2.h +// CHECK-BUILD: {{[ \t]}}Inputs/relative-dep-gen{{(-cwd)?}}.modulemap +// CHECK-BUILD: {{[ \t]}}Inputs/relative-dep-gen-1.h +// CHECK-BUILD: {{[ \t]}}Inputs/relative-dep-gen-2.h // CHECK-USE: use.o: -// CHECK-USE-DAG: Inputs/relative-dep-gen{{(-cwd)?}}.modulemap -// CHECK-USE-DAG: relative-dep-gen.cpp -// CHECK-USE-DAG: Inputs{{[/\\]}}relative-dep-gen-1.h +// CHECK-USE-DAG: {{[ \t]}}relative-dep-gen.cpp +// CHECK-USE-DAG: {{[ \t]}}Inputs{{[/\\]}}relative-dep-gen-1.h |