From 08aba1bc5536a4deabb8d0196bf30b80c61a0568 Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Wed, 27 Mar 2013 05:12:34 +0000 Subject: [PATCH] [lib/Headers] Break the module import cycle between _Builtin_intrinsics.sse and _Builtin_intrinsics.sse2 Module "sse" implicitly exports module "sse2". This is bad because we also have module "sse2" export module "sse" (as intended) so we end up with a cycle in the module import graph: 1. sse2 -> (also imports) sse 2. sse -> (also imports) sse2 To eliminate the cycle remove 2.; importing module "sse2" will also import module "sse", but just importing module "sse" will not also import module "sse2". rdar://13240552 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178117 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Headers/module.map | 1 - lib/Headers/xmmintrin.h | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Headers/module.map b/lib/Headers/module.map index b24bccc120..1b476a5e55 100644 --- a/lib/Headers/module.map +++ b/lib/Headers/module.map @@ -33,7 +33,6 @@ module _Builtin_intrinsics [system] { explicit module sse { requires sse export mmx - export * // note: for hackish dependency header "xmmintrin.h" } diff --git a/lib/Headers/xmmintrin.h b/lib/Headers/xmmintrin.h index b3b23cb7d0..8c5fc9528c 100644 --- a/lib/Headers/xmmintrin.h +++ b/lib/Headers/xmmintrin.h @@ -983,10 +983,12 @@ do { \ #define _m_ _mm_ #define _m_ _mm_ +#if !__has_feature(modules) /* Ugly hack for backwards-compatibility (compatible with gcc) */ #ifdef __SSE2__ #include #endif +#endif #endif /* __SSE__ */ -- 2.49.0