diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-03-11 02:02:47 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-03-11 02:02:47 +0000 |
commit | 723928c7dcc79f7b19eb602fe52baae480b85a54 (patch) | |
tree | 509f01c8d5a8a45ef4b38a50814b32e8df88a4aa /clang/test/Modules/include-relative.c | |
parent | 0211714ecb22d6e6f13a0c6681fb88b9365004dc (diff) | |
download | bcm5719-llvm-723928c7dcc79f7b19eb602fe52baae480b85a54.tar.gz bcm5719-llvm-723928c7dcc79f7b19eb602fe52baae480b85a54.zip |
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
Diffstat (limited to 'clang/test/Modules/include-relative.c')
-rw-r--r-- | clang/test/Modules/include-relative.c | 11 |
1 files changed, 11 insertions, 0 deletions
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; } |