From: Logan Chien Date: Wed, 26 Sep 2012 09:40:37 +0000 (+0000) Subject: Fix build failure and enhance the testcase for unwind.h. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=86b671b603142f7368be19fcf49971f0aaa2de39;p=clang 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 --- 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"