Reinstate r223753, reverted in r223759 due to breakage of clang-tools-extra.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 10 Dec 2014 03:09:48 +0000 (03:09 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 10 Dec 2014 03:09:48 +0000 (03:09 +0000)
commit9acb99e342376c6269fb70d1e9665c2790b93b12
tree62e72141d8eb9828e0cb78f3eff7e4309fdf2060
parent49475327fffdfb4cde572b5955d7d94d801d84bf
Reinstate r223753, reverted in r223759 due to breakage of clang-tools-extra.
Original commit message:

[modules] Add experimental -fmodule-map-file-home-is-cwd flag to -cc1.

For files named by -fmodule-map-file=, and files found by 'extern module'
directives, this flag specifies that we should resolve filenames relative to
the current working directory rather than relative to the directory in which
the module map file resides. This is aimed at fixing path handling, in
particular for relative -I paths, when building modules that represent
components of the current project (rather than libraries installed on the
current system, which the current project has as dependencies, where we'd
typically expect the module map files to be looked up implicitly).

llvm-svn: 223913
13 files changed:
clang/include/clang/Driver/CC1Options.td
clang/include/clang/Lex/HeaderSearch.h
clang/include/clang/Lex/HeaderSearchOptions.h
clang/include/clang/Lex/ModuleMap.h
clang/lib/Frontend/CompilerInvocation.cpp
clang/lib/Lex/HeaderSearch.cpp
clang/lib/Lex/ModuleMap.cpp
clang/test/Modules/Inputs/modular_maps-moduleb-cwd.map [new file with mode: 0644]
clang/test/Modules/Inputs/modular_maps/modulea-cwd.map [new file with mode: 0644]
clang/test/Modules/Inputs/modular_maps/modulec-cwd.map [new file with mode: 0644]
clang/test/Modules/Inputs/relative-dep-gen-cwd.modulemap [new file with mode: 0644]
clang/test/Modules/modular_maps.cpp
clang/test/Modules/relative-dep-gen.cpp