We used to have -fmodule-implementation-of and it was merged with -fmodule-name. But this causes some regression on our internal projects. We are now seeing non-modular include warnings.
This is triggered when we have relative includes to a VFS-mapped module, -I that points us to the real header and -F that points us to the vfs. The real header that is part of the umbrella directory will be classified as non-modular.
It seems like we can use CompilingModule to tell if we are compiling the interface of a module or the implementation file of a module. When compiling the implementation file, we don't diagnose non-modular includes. The non-modular includes will be diagnosed when building the interface and writing the pcm file.
Related changes:
http://llvm.org/viewvc/llvm-project?rev=213767&view=rev
http://llvm.org/viewvc/llvm-project?rev=261372&view=rev
http://llvm.org/viewvc/llvm-project?rev=263449&view=rev