aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2011-11-27 15:21:33 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2011-11-27 15:21:33 +0000
commit1376ba9dddccc02e8c187bbfa4c66f2c0938b0c0 (patch)
tree847d713edb09b00522640f0615d02b16e411c470
parent7f16d7067e11d2684b644c8af7c21cdc77b32723 (diff)
Error on non x86 architectures.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145185 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Headers/cpuid.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Headers/cpuid.h b/lib/Headers/cpuid.h
index 6d58ad9dff..b7fe7542d5 100644
--- a/lib/Headers/cpuid.h
+++ b/lib/Headers/cpuid.h
@@ -21,6 +21,10 @@
*===-----------------------------------------------------------------------===
*/
+#if !(__x86_64__ || __i386__)
+#error this header is for x86 only
+#endif
+
static inline int __get_cpuid (unsigned int level, unsigned int *eax,
unsigned int *ebx, unsigned int *ecx,
unsigned int *edx) {