aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Headers/cpuid.h6
-rw-r--r--lib/Headers/module.map1
-rw-r--r--test/Headers/c11.c1
-rw-r--r--test/Headers/c89.c1
-rw-r--r--test/Headers/cxx11.cpp1
5 files changed, 7 insertions, 3 deletions
diff --git a/lib/Headers/cpuid.h b/lib/Headers/cpuid.h
index 6d7d61d508..7b012384a2 100644
--- a/lib/Headers/cpuid.h
+++ b/lib/Headers/cpuid.h
@@ -25,9 +25,9 @@
#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) {
+static __inline int __get_cpuid (unsigned int __level, unsigned int *__eax,
+ unsigned int *__ebx, unsigned int *__ecx,
+ unsigned int *__edx) {
__asm("cpuid" : "=a"(*__eax), "=b" (*__ebx), "=c"(*__ecx), "=d"(*__edx)
: "0"(__level));
return 1;
diff --git a/lib/Headers/module.map b/lib/Headers/module.map
index 1b476a5e55..aa219cb407 100644
--- a/lib/Headers/module.map
+++ b/lib/Headers/module.map
@@ -17,6 +17,7 @@ module _Builtin_intrinsics [system] {
}
explicit module cpuid {
+ requires x86
header "cpuid.h"
}
diff --git a/test/Headers/c11.c b/test/Headers/c11.c
index 24a1c2a60d..f65164d15c 100644
--- a/test/Headers/c11.c
+++ b/test/Headers/c11.c
@@ -1,4 +1,5 @@
// RUN: %clang -fsyntax-only -Xclang -verify -std=c11 %s
+// RUN: %clang -fsyntax-only -Xclang -verify -std=c11 -fmodules %s
noreturn int f(); // expected-error 1+{{}}
diff --git a/test/Headers/c89.c b/test/Headers/c89.c
index acf01b40e0..95f692b8f0 100644
--- a/test/Headers/c89.c
+++ b/test/Headers/c89.c
@@ -1,4 +1,5 @@
// RUN: %clang -target i386-apple-darwin10 -fsyntax-only -Xclang -verify -std=c89 %s
+// RUN: %clang -target i386-apple-darwin10 -fsyntax-only -Xclang -verify -std=c89 -fmodules %s
// expected-no-diagnostics
// FIXME: Disable inclusion of mm_malloc.h, our current implementation is broken
diff --git a/test/Headers/cxx11.cpp b/test/Headers/cxx11.cpp
index 995fc6528d..41bdc76fda 100644
--- a/test/Headers/cxx11.cpp
+++ b/test/Headers/cxx11.cpp
@@ -1,4 +1,5 @@
// RUN: %clang -fsyntax-only -std=c++11 %s
+// RUN: %clang -fsyntax-only -std=c++11 -fmodules %s
#include <stdalign.h>