]> granicus.if.org Git - clang/commit
Revert r201734 and r201742.
authorDaniel Jasper <djasper@google.com>
Thu, 20 Feb 2014 11:10:48 +0000 (11:10 +0000)
committerDaniel Jasper <djasper@google.com>
Thu, 20 Feb 2014 11:10:48 +0000 (11:10 +0000)
commit65c6714cfd2d6df03551f4c2bee0e2ea15396b35
tree23e7f34b31df9b2d4b58a4ae03237c186a614c41
parent40011b2135ff0f47be2868c670b1308b93751a7b
Revert r201734 and r201742.

This breaks backwards compatibility with existing code. Previously, this
was defined as

  #define _mm_prefetch(a, sel) (__builtin_prefetch((void *)(a), 0, (sel)))

Which basically accepts any pointer. Changing this to char* simply
breaks a lot of existing code. I have tried changing char* to
"const void*", which seems to be the right thing as per Intel
specification this should work on basically any pointer. However,
apparently this breaks windows compatibility (because of a conflicting
declaration in windows.h).

So, we probably need to #ifdef this based on whether clang is compiling
for windows. According to Chandler, this might be done by introducing an
additional symbol to a fake type in BuiltinsX86.def and then condition
the type expansion on the platform.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201775 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/Builtins.def
include/clang/Basic/BuiltinsX86.def
include/clang/Sema/Sema.h
lib/CodeGen/CGBuiltin.cpp
lib/Headers/Intrin.h
lib/Headers/xmmintrin.h
lib/Sema/SemaChecking.cpp
test/CodeGen/ms-builtins.c [deleted file]
test/Headers/mmprefetch.c [deleted file]