It turns out that `Module::buildVisibleModulesCache` just recursively calls 
`Module::getExportedModules`. So without the self-export, the submodule doesn't 
export anything and contributes no exports, but if it does export itself, then 
it contributes itself to the list of exports.

In this case, e.g. `#include <x86intrin.h>` will trigger `module intel` to be 
imported, and since that module imports `wmmintrin.h` (through `immintrin.h`), 
then the aforementioned situation triggers.


http://reviews.llvm.org/D9842

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to