eladcohen created this revision. eladcohen added a reviewer: rsmith. eladcohen added a subscriber: cfe-commits.
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. https://reviews.llvm.org/D24752 Files: lib/Headers/module.modulemap test/Modules/compiler_builtins_x86_submodules.c Index: test/Modules/compiler_builtins_x86_submodules.c =================================================================== --- test/Modules/compiler_builtins_x86_submodules.c +++ test/Modules/compiler_builtins_x86_submodules.c @@ -0,0 +1,15 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -triple i686-unknown-unknown -target-feature +3dnowa -fsyntax-only -fmodules -fimplicit-module-maps -fmodules-cache-path=%t %s -verify -ffreestanding + +// expected-no-diagnostics + +#include<mm3dnow.h> + +__m64 x; // Verify that types which are used by mm3dnow.h + // but declared in the mmx submodule get imported + +#include<wmmintrin.h> + +__m128i y; // Verify that types which are used by wmmintrin.h + // but declared in the sse2 submodule get imported + Index: lib/Headers/module.modulemap =================================================================== --- lib/Headers/module.modulemap +++ lib/Headers/module.modulemap @@ -119,6 +119,7 @@ } explicit module mm3dnow { + export mmx header "mm3dnow.h" } @@ -129,6 +130,7 @@ } explicit module aes { + export sse2 header "__wmmintrin_aes.h" }
Index: test/Modules/compiler_builtins_x86_submodules.c =================================================================== --- test/Modules/compiler_builtins_x86_submodules.c +++ test/Modules/compiler_builtins_x86_submodules.c @@ -0,0 +1,15 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -triple i686-unknown-unknown -target-feature +3dnowa -fsyntax-only -fmodules -fimplicit-module-maps -fmodules-cache-path=%t %s -verify -ffreestanding + +// expected-no-diagnostics + +#include<mm3dnow.h> + +__m64 x; // Verify that types which are used by mm3dnow.h + // but declared in the mmx submodule get imported + +#include<wmmintrin.h> + +__m128i y; // Verify that types which are used by wmmintrin.h + // but declared in the sse2 submodule get imported + Index: lib/Headers/module.modulemap =================================================================== --- lib/Headers/module.modulemap +++ lib/Headers/module.modulemap @@ -119,6 +119,7 @@ } explicit module mm3dnow { + export mmx header "mm3dnow.h" } @@ -129,6 +130,7 @@ } explicit module aes { + export sse2 header "__wmmintrin_aes.h" }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits