aboutsummaryrefslogtreecommitdiff
path: root/clang
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-03-27 05:12:34 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-03-27 05:12:34 +0000
commitfff55a028bd4b8e47386026588e03a4f202b26ff (patch)
tree3dc4dbb5b66d1eca63d60670f6eab17c5c474954 /clang
parent15eaebea151b31e36376bbbdc02a73aeceb02cef (diff)
downloadllvm-fff55a028bd4b8e47386026588e03a4f202b26ff.zip
llvm-fff55a028bd4b8e47386026588e03a4f202b26ff.tar.gz
llvm-fff55a028bd4b8e47386026588e03a4f202b26ff.tar.bz2
[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 llvm-svn: 178117
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/Headers/module.map1
-rw-r--r--clang/lib/Headers/xmmintrin.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Headers/module.map b/clang/lib/Headers/module.map
index b24bccc..1b476a5 100644
--- a/clang/lib/Headers/module.map
+++ b/clang/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/clang/lib/Headers/xmmintrin.h b/clang/lib/Headers/xmmintrin.h
index b3b23cb..8c5fc95 100644
--- a/clang/lib/Headers/xmmintrin.h
+++ b/clang/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__ */