]> granicus.if.org Git - clang/commitdiff
MS intrinsics: don't declare __readeflags and __writeeflags in Intrin.h
authorHans Wennborg <hans@hanshq.net>
Wed, 12 Mar 2014 21:09:03 +0000 (21:09 +0000)
committerHans Wennborg <hans@hanshq.net>
Wed, 12 Mar 2014 21:09:03 +0000 (21:09 +0000)
They're already defined in ia32intrin.h, and this would cause including Intrin.h
in 64-bit mode to fail because of conflicting types. Update ms-intrin.cpp to
also run in 64-bit mode to catch things like this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203714 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Headers/Intrin.h
test/Headers/ms-intrin.cpp

index f5843cfab06920a662b4009d884e03034b60d267..54e08993506949c0ce69d089da539faec43928a8 100644 (file)
@@ -106,7 +106,6 @@ unsigned long __readcr3(void);
 unsigned long __readcr4(void);
 unsigned long __readcr8(void);
 unsigned int __readdr(unsigned int);
-unsigned int __readeflags(void);
 #ifdef __i386__
 static __inline__
 unsigned char __readfsbyte(unsigned long);
@@ -142,7 +141,6 @@ void __writecr3(unsigned int);
 void __writecr4(unsigned int);
 void __writecr8(unsigned int);
 void __writedr(unsigned int, unsigned int);
-void __writeeflags(unsigned int);
 void __writefsbyte(unsigned long, unsigned char);
 void __writefsdword(unsigned long, unsigned long);
 void __writefsqword(unsigned long, unsigned __int64);
index 4583915f4438f0510f0a2d12c21f805067ab9bdc..03f57a5955b9c2a07b6de44306a9fb4e2d2a2af0 100644 (file)
@@ -3,6 +3,11 @@
 // RUN:     -ffreestanding -fsyntax-only -Werror \
 // RUN:     -isystem %S/Inputs/include %s
 
+// RUN: %clang_cc1 -triple x86_64-pc-win32  \
+// RUN:     -fms-extensions -fms-compatibility -fmsc-version=1700 \
+// RUN:     -ffreestanding -fsyntax-only -Werror \
+// RUN:     -isystem %S/Inputs/include %s
+
 // Intrin.h needs size_t, but -ffreestanding prevents us from getting it from
 // stddef.h.  Work around it with this typedef.
 typedef __SIZE_TYPE__ size_t;