From 723928c7dcc79f7b19eb602fe52baae480b85a54 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 11 Mar 2014 02:02:47 +0000 Subject: If a module map is found in a relative -I path, convert the filenames within it to absolute paths when building the includes file for the module. Without this, the module build would fail, because the relative paths we were using are not necessarily relative to a directory in our include path. llvm-svn: 203528 --- clang/test/Modules/include-relative.c | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 clang/test/Modules/include-relative.c (limited to 'clang/test/Modules/include-relative.c') diff --git a/clang/test/Modules/include-relative.c b/clang/test/Modules/include-relative.c new file mode 100644 index 00000000000..264df5f3189 --- /dev/null +++ b/clang/test/Modules/include-relative.c @@ -0,0 +1,11 @@ +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: cp -r %S/Inputs/include-relative %t/include-relative +// RUN: cd %t +// RUN: %clang_cc1 -fmodules -x c -verify -fmodules-cache-path=%t -I include-relative %s + +// expected-no-diagnostics + +#include "a.h" + +int f() { return n; } -- cgit v1.2.3