]> granicus.if.org Git - clang/commitdiff
Fix compiler_builtins.m test to not rely on including system stdlib.h and malloc.h
authorHans Wennborg <hans@hanshq.net>
Thu, 22 Jan 2015 00:45:20 +0000 (00:45 +0000)
committerHans Wennborg <hans@hanshq.net>
Thu, 22 Jan 2015 00:45:20 +0000 (00:45 +0000)
Importing _Builtin_intrinsics.sse and avx would transitively pull in those
headers, and the test would fail when building in an environment where
they were not available on the include path.

This fixes PR20995 for me.

Differential Revision: http://reviews.llvm.org/D7112

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

test/Modules/Inputs/System/usr/include/malloc.h [new file with mode: 0644]
test/Modules/Inputs/System/usr/include/stdlib.h [new file with mode: 0644]
test/Modules/compiler_builtins.m

diff --git a/test/Modules/Inputs/System/usr/include/malloc.h b/test/Modules/Inputs/System/usr/include/malloc.h
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/Modules/Inputs/System/usr/include/stdlib.h b/test/Modules/Inputs/System/usr/include/stdlib.h
new file mode 100644 (file)
index 0000000..a1bf1a8
--- /dev/null
@@ -0,0 +1 @@
+typedef __SIZE_TYPE__ size_t;
index 4b8cb5bdc5d5af68b77de6b2fabd408fda9e4993..f120bcfd98246d75337ad5ecf8cec8e5e82318d9 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: rm -rf %t
-// RUN: %clang -fsyntax-only -fmodules -fmodules-cache-path=%t -D__need_wint_t %s -Xclang -verify
-// RUN: %clang -fsyntax-only -std=c99 -fmodules -fmodules-cache-path=%t -D__need_wint_t %s -Xclang -verify
+// RUN: %clang -fsyntax-only -fmodules -fmodules-cache-path=%t -D__need_wint_t %s -I%S/Inputs/System/usr/include -Xclang -verify
+// RUN: %clang -fsyntax-only -std=c99 -fmodules -fmodules-cache-path=%t -D__need_wint_t %s -I%S/Inputs/System/usr/include -Xclang -verify
 // expected-no-diagnostics
 
 #ifdef __SSE__