[PATCH] Repro for absolute pcm paths in deps file.
Manuel Klimek
klimek at google.com
Tue Mar 17 03:53:02 PDT 2015
Hi rsmith, djasper,
This test breaks. A guide towards a fix would be appreciated :)
http://reviews.llvm.org/D8376
Files:
test/Modules/Inputs/relative-module-paths/a.h
test/Modules/Inputs/relative-module-paths/b.h
test/Modules/Inputs/relative-module-paths/module.map
test/Modules/relative-module-paths.cpp
Index: test/Modules/Inputs/relative-module-paths/a.h
===================================================================
--- /dev/null
+++ test/Modules/Inputs/relative-module-paths/a.h
@@ -0,0 +1,7 @@
+#ifndef A_H
+#define A_H
+
+void a() {
+}
+
+#endif
Index: test/Modules/Inputs/relative-module-paths/b.h
===================================================================
--- /dev/null
+++ test/Modules/Inputs/relative-module-paths/b.h
@@ -0,0 +1,10 @@
+#ifndef B_H
+#define B_H
+
+#include "a.h"
+
+void b() {
+ a();
+}
+
+#endif
Index: test/Modules/Inputs/relative-module-paths/module.map
===================================================================
--- /dev/null
+++ test/Modules/Inputs/relative-module-paths/module.map
@@ -0,0 +1,12 @@
+module "a" {
+ export *
+ header "Inputs/relative-module-paths/a.h"
+}
+
+module "b" {
+ export *
+ header "Inputs/relative-module-paths/b.h"
+ use "a"
+}
+
+
Index: test/Modules/relative-module-paths.cpp
===================================================================
--- /dev/null
+++ test/Modules/relative-module-paths.cpp
@@ -0,0 +1,34 @@
+// RQUIRES: shell
+// RUN: rm -rf %t
+// RUN: mkdir -p %t
+// RUN: cd %t
+// RUN: ln -s %S/Inputs Inputs
+
+// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodule-name=a -o a.pcm \
+// RUN: -fno-implicit-modules -fmodule-map-file-home-is-cwd \
+// RUN: -emit-module Inputs/relative-module-paths/module.map
+
+// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodule-name=b -o b.pcm \
+// RUN: -fmodule-file=a.pcm \
+// RUN: -fno-implicit-modules -fmodule-map-file-home-is-cwd \
+// RUN: -emit-module Inputs/relative-module-paths/module.map
+
+// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules %s \
+// RUN: -fmodule-map-file=Inputs/relative-module-paths/module.map \
+// RUN: -fmodule-file=b.pcm \
+// RUN: -fno-implicit-modules -fmodule-map-file-home-is-cwd \
+// RUN: -module-file-deps -MT %s.o -dependency-file deps
+
+// RUN: cat deps
+// RUN: FileCheck %s < %t/deps
+
+#include "Inputs/relative-module-paths/a.h"
+
+void f() {
+ a();
+}
+
+// CHECK: Hah
+
+
+
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8376.22085.patch
Type: text/x-patch
Size: 2104 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150317/b19f018a/attachment.bin>
More information about the cfe-commits
mailing list