Don't diagnose non-modular includes when we are not compiling a module.
authorManman Ren <manman.ren@gmail.com>
Fri, 26 Aug 2016 17:16:46 +0000 (17:16 +0000)
committerManman Ren <manman.ren@gmail.com>
Fri, 26 Aug 2016 17:16:46 +0000 (17:16 +0000)
commita67e4d32544dc26393a54619b5fe2b63f581773e
treece711aac46c8b30f73d0d91e3e1bd7333e27e251
parentda9c56299b7c43c89c320ea72d0379e7debe7475
Don't diagnose non-modular includes when we are not compiling a module.

This is triggered when we are compiling an implementation of a module,
it has relative includes to a VFS-mapped module with umbrella headers.
Currently we will find the real path to headers under the umbrella directory,
but the umbrella directories are using virtual path.

rdar://27951255

Thanks Ben and Richard for reviewing the patch!
Differential Revision: http://reviews.llvm.org/D23858

llvm-svn: 279838
clang/lib/Lex/ModuleMap.cpp
clang/test/VFS/Inputs/Nonmodular/A.h [new file with mode: 0644]
clang/test/VFS/Inputs/Nonmodular/Nonmodular.modulemap [new file with mode: 0644]
clang/test/VFS/Inputs/Nonmodular/nonmodular-headers.yaml [new file with mode: 0644]
clang/test/VFS/Inputs/Nonmodular/test.c [new file with mode: 0644]
clang/test/VFS/Inputs/Nonmodular/umbrella.h [new file with mode: 0644]
clang/test/VFS/test_nonmodular.c [new file with mode: 0644]