diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-03-27 05:12:34 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-03-27 05:12:34 +0000 |
commit | 08aba1bc5536a4deabb8d0196bf30b80c61a0568 (patch) | |
tree | 25462182c634c90995e6ec510a53f28e5611d3d2 | |
parent | 9ef9875bbe19dc9f73c6c95b803d9a4945168690 (diff) |
[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
-rw-r--r-- | lib/Headers/module.map | 1 | ||||
-rw-r--r-- | lib/Headers/xmmintrin.h | 2 |
2 files changed, 2 insertions, 1 deletions
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 <emmintrin.h> 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 <emmintrin.h> #endif +#endif #endif /* __SSE__ */ |