[PATCH] D24752: [Modules] Add missing dependencies to clang builtins modulemap

Bruno Cardoso Lopes via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 6 13:21:29 PDT 2016


bruno added inline comments.


> eladcohen wrote in module.modulemap:133
> emmintrin.h is already included explicitly in wmmintrin.h & __wmmintrin_aes.h.
> 
> If a user includes <x86intrin.h>/<immintrin.h> there is no problem, since the intel submodule has an 'export *' directive and both aes & sse2 will be imported.
> 
> However, if the user only includes <wmmintrin.h> (like in the 2nd half of the test I added), and uses modules, then any use of the '___m128i' type (which is used in the aes intrinsics and declared in sse2) will result with the error:
> "File tst.c Line 11: missing '#include <emmintrin.h>'; declaration of '___m128i' must be imported from module '_Builtin_intrinsics.intel.sse2' before it is required"
> 
> IIUC the possible fixes for this are adding 'export *' or 'export sse2' to the aes submodule.

I see, if you need the type to use the exported functions it makes sense to re-export it. It might be worth adding a comment // note: for ___m128i

https://reviews.llvm.org/D24752





More information about the cfe-commits mailing list