]> granicus.if.org Git - clang/commitdiff
Fix build failure and enhance the testcase for unwind.h.
authorLogan Chien <tzuhsiang.chien@gmail.com>
Wed, 26 Sep 2012 09:40:37 +0000 (09:40 +0000)
committerLogan Chien <tzuhsiang.chien@gmail.com>
Wed, 26 Sep 2012 09:40:37 +0000 (09:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164683 91177308-0d34-0410-b5e6-96231b3b80d8

test/Headers/Inputs/include/stdint.h [new file with mode: 0644]
test/Headers/unwind.c

diff --git a/test/Headers/Inputs/include/stdint.h b/test/Headers/Inputs/include/stdint.h
new file mode 100644 (file)
index 0000000..4a7cd36
--- /dev/null
@@ -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 */
index b2a9265d5fe5988a1efe245a73ec2ccd56d86f81..3331ac46207c4eff307a2f19a9d5b278d49cdc32 100644 (file)
@@ -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"