Module and auto include file mapping

Hello,

While I was playing with the new clang module functionality, I encountered an issue with the ‘convert #include in import’ feature.

Apparently, when including a file using an absolute path, clang does not try at all to map it to possibly existing included module. It results in some inconsistencies when compiling with and without module enabled.

Take for instance this source file:

------------ include.c

#include “/usr/include/stdio.h”

#include <stdio.h>

Hello,

While I was playing with the new clang module functionality, I encountered an issue with the ‘convert #include in import’ feature.

Apparently, when including a file using an absolute path, clang does not try at all to map it to possibly existing included module. It results in some inconsistencies when compiling with and without module enabled.

This is sort of expected. We look for the module.map file in the base of the include path where the header was found (the path given to -I or -isystem). If you give an absolute path, then there is no such path.