diff --git a/clang/lib/Headers/module.modulemap b/clang/lib/Headers/module.modulemap index b147e891dceb..afb38652ef54 100644 --- a/clang/lib/Headers/module.modulemap +++ b/clang/lib/Headers/module.modulemap @@ -44,6 +44,7 @@ module _Builtin_intrinsics [system] [extern_c] { } explicit module sse { + export mm_malloc export mmx export sse2 // note: for hackish dependency header "xmmintrin.h" diff --git a/clang/test/Headers/xmmintrin.c b/clang/test/Headers/xmmintrin.c index 39743c96b783..9e15f3ba4649 100644 --- a/clang/test/Headers/xmmintrin.c +++ b/clang/test/Headers/xmmintrin.c @@ -23,3 +23,7 @@ __m128 test_xmmintrin_provides_emmintrin(__m128d __a, __m128d __b) { return _mm_add_sd(__a, __b); } +#if __STDC_HOSTED__ +// Make sure stdlib.h symbols are accessible. +void *p = NULL; +#endif