aboutsummaryrefslogtreecommitdiff
path: root/test/Headers
diff options
context:
space:
mode:
authorLogan Chien <tzuhsiang.chien@gmail.com>2012-09-26 09:40:37 +0000
committerLogan Chien <tzuhsiang.chien@gmail.com>2012-09-26 09:40:37 +0000
commit86b671b603142f7368be19fcf49971f0aaa2de39 (patch)
treec83709f39dee9b0e91930231aa45b9c29d4ff594 /test/Headers
parent025560c728931c18aa73a37dea872b155c937f43 (diff)
Fix build failure and enhance the testcase for unwind.h.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164683 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Headers')
-rw-r--r--test/Headers/Inputs/include/stdint.h14
-rw-r--r--test/Headers/unwind.c20
2 files changed, 31 insertions, 3 deletions
diff --git a/test/Headers/Inputs/include/stdint.h b/test/Headers/Inputs/include/stdint.h
new file mode 100644
index 0000000000..4a7cd36170
--- /dev/null
+++ b/test/Headers/Inputs/include/stdint.h
@@ -0,0 +1,14 @@
+#ifndef STDINT_H
+#define STDINT_H
+
+#if defined(__arm__) || defined(__i386__) || defined(__mips__)
+typedef unsigned int uint32_t;
+typedef unsigned int uintptr_t;
+#elif defined(__x86_64__)
+typedef unsigned int uint32_t;
+typedef unsigned long uintptr_t;
+#else
+#error "Unknown target architecture"
+#endif
+
+#endif /* STDINT_H */
diff --git a/test/Headers/unwind.c b/test/Headers/unwind.c
index b2a9265d5f..3331ac4620 100644
--- a/test/Headers/unwind.c
+++ b/test/Headers/unwind.c
@@ -1,5 +1,19 @@
-// RUN: %clang -target arm-unknown-linux-gnueabi -ffreestanding -fsyntax-only %s
-// RUN: %clang -target i686-unknown-linux -ffreestanding -fsyntax-only %s
-// RUN: %clang -ffreestanding -fsyntax-only -x c++ %s
+// RUN: %clang -target arm-unknown-linux-gnueabi \
+// RUN: -isystem %S/Inputs/include -ffreestanding -fsyntax-only %s
+// RUN: %clang -target mips-unknown-linux \
+// RUN: -isystem %S/Inputs/include -ffreestanding -fsyntax-only %s
+// RUN: %clang -target i686-unknown-linux \
+// RUN: -isystem %S/Inputs/include -ffreestanding -fsyntax-only %s
+// RUN: %clang -target x86_64-unknown-linux \
+// RUN: -isystem %S/Inputs/include -ffreestanding -fsyntax-only %s
+
+// RUN: %clang -target arm-unknown-linux-gnueabi \
+// RUN: -isystem %S/Inputs/include -ffreestanding -fsyntax-only -x c++ %s
+// RUN: %clang -target mips-unknown-linux \
+// RUN: -isystem %S/Inputs/include -ffreestanding -fsyntax-only -x c++ %s
+// RUN: %clang -target i686-unknown-linux \
+// RUN: -isystem %S/Inputs/include -ffreestanding -fsyntax-only -x c++ %s
+// RUN: %clang -target x86_64-unknown-linux \
+// RUN: -isystem %S/Inputs/include -ffreestanding -fsyntax-only -x c++ %s
#include "unwind.h"