X86 intrinsic header files mm3dnow.h and wmmintrin.h include and depend on mmintrin.h and emmintrin.h respectively.
This patch adds these missing dependencies to the corresponding submodules in the clang builtins modulemap.
Details
- Reviewers
rsmith jtsoftware
Diff Detail
Event Timeline
lib/Headers/module.modulemap | ||
---|---|---|
133 | The mmx case above makes sense to me, but I find conceptually odd that we need to re-export sse2 in aes module, why not explicitly #include <emmintrin.h> in the source file? |
lib/Headers/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: IIUC the possible fixes for this are adding 'export *' or 'export sse2' to the aes submodule. |
lib/Headers/module.modulemap | ||
---|---|---|
133 | 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 |
The mmx case above makes sense to me, but I find conceptually odd that we need to re-export sse2 in aes module, why not explicitly #include <emmintrin.h> in the source file?