From 89a1e712a92ec5a3f46ff93f70698b51637d968d Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Sat, 16 Apr 2016 00:46:26 +0000 Subject: [PATCH] [modules] Don't expose *intrin.h headers that cannot be included standalone as separate modules. These cause build breakage with -fmodules-local-submodule-visibility. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266501 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Headers/module.modulemap | 61 +++++++----------------------------- test/Headers/cxx11.cpp | 1 + 2 files changed, 13 insertions(+), 49 deletions(-) diff --git a/lib/Headers/module.modulemap b/lib/Headers/module.modulemap index 95cc5fbf97..4b2cb857a6 100644 --- a/lib/Headers/module.modulemap +++ b/lib/Headers/module.modulemap @@ -47,7 +47,19 @@ module _Builtin_intrinsics [system] [extern_c] { export * header "immintrin.h" + textual header "f16cintrin.h" + textual header "avxintrin.h" + textual header "avx2intrin.h" + textual header "avx512fintrin.h" + textual header "avx512erintrin.h" + textual header "fmaintrin.h" + header "x86intrin.h" + textual header "bmiintrin.h" + textual header "bmi2intrin.h" + textual header "lzcntintrin.h" + textual header "xopintrin.h" + textual header "fma4intrin.h" explicit module mm_malloc { header "mm_malloc.h" @@ -62,10 +74,6 @@ module _Builtin_intrinsics [system] [extern_c] { header "mmintrin.h" } - explicit module f16c { - header "f16cintrin.h" - } - explicit module sse { export mm_malloc export mmx @@ -103,46 +111,6 @@ module _Builtin_intrinsics [system] [extern_c] { header "ammintrin.h" } - explicit module avx { - export sse4_2 - header "avxintrin.h" - } - - explicit module avx2 { - export avx - header "avx2intrin.h" - } - - explicit module avx512f { - export avx2 - header "avx512fintrin.h" - } - - explicit module avx512er { - header "avx512erintrin.h" - } - - explicit module bmi { - header "bmiintrin.h" - } - - explicit module bmi2 { - header "bmi2intrin.h" - } - - explicit module fma { - header "fmaintrin.h" - } - - explicit module fma4 { - export sse3 - header "fma4intrin.h" - } - - explicit module lzcnt { - header "lzcntintrin.h" - } - explicit module popcnt { header "popcntintrin.h" } @@ -151,11 +119,6 @@ module _Builtin_intrinsics [system] [extern_c] { header "mm3dnow.h" } - explicit module xop { - export fma4 - header "xopintrin.h" - } - explicit module aes_pclmul { header "wmmintrin.h" export aes diff --git a/test/Headers/cxx11.cpp b/test/Headers/cxx11.cpp index 0b35a7c2bd..324bd99585 100644 --- a/test/Headers/cxx11.cpp +++ b/test/Headers/cxx11.cpp @@ -1,6 +1,7 @@ // RUN: rm -rf %t // RUN: %clang_cc1 -ffreestanding -fsyntax-only -std=c++11 %s // RUN: %clang_cc1 -ffreestanding -fsyntax-only -std=c++11 -fmodules -fmodules-cache-path=%t %s +// RUN: %clang_cc1 -ffreestanding -fsyntax-only -std=c++11 -fmodules -fmodules-cache-path=%t -fmodules-local-submodule-visibility %s // This test fails on systems with older OS X 10.9 SDK headers, see PR18322. -- 2.40.0