Fix build failure and enhance the testcase for unwind.h.

llvm-svn: 164683
This commit is contained in:
Logan Chien 2012-09-26 09:40:37 +00:00
parent 776d7126b7
commit 35795cf9c1
2 changed files with 31 additions and 3 deletions

View File

@ -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 */

View 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"