From 1574e4336f5683313b87da8e364d2002149a5fb9 Mon Sep 17 00:00:00 2001 From: Elad Cohen Date: Wed, 28 Sep 2016 11:59:09 +0000 Subject: [PATCH] [X86] Remove the mm_malloc.h include guard hack from the X86 builtins tests The X86 clang/test/CodeGen/*builtins.c tests define the mm_malloc.h include guard as a hack for avoiding its inclusion (mm_malloc.h requires a hosted environment since it expects stdlib.h to be available - which is not the case in these internal clang codegen tests). This patch removes this hack and instead passes -ffreestanding to clang cc1. Differential Revision: https://reviews.llvm.org/D24825 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282581 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/3dnow-builtins.c | 6 ++---- test/CodeGen/avx-builtins.c | 6 ++---- test/CodeGen/avx-cmp-builtins.c | 4 +--- test/CodeGen/avx-shuffle-builtins.c | 4 +--- test/CodeGen/avx2-builtins.c | 6 ++---- test/CodeGen/avx512bw-builtins.c | 6 ++---- test/CodeGen/avx512cdintrin.c | 4 +--- test/CodeGen/avx512dq-builtins.c | 4 +--- test/CodeGen/avx512er-builtins.c | 4 +--- test/CodeGen/avx512f-builtins.c | 5 +---- test/CodeGen/avx512ifma-builtins.c | 4 +--- test/CodeGen/avx512pf-builtins.c | 4 +--- test/CodeGen/avx512vbmi-builtins.c | 4 +--- test/CodeGen/avx512vbmivl-builtin.c | 4 +--- test/CodeGen/avx512vl-builtins.c | 4 +--- test/CodeGen/avx512vlbw-builtins.c | 6 ++---- test/CodeGen/avx512vlcd-builtins.c | 4 +--- test/CodeGen/avx512vldq-builtins.c | 4 +--- test/CodeGen/bitscan-builtins.c | 4 +--- test/CodeGen/bmi-builtins.c | 4 +--- test/CodeGen/bmi2-builtins.c | 6 ++---- test/CodeGen/f16c-builtins.c | 4 +--- test/CodeGen/fma-builtins.c | 4 +--- test/CodeGen/fma4-builtins.c | 4 +--- test/CodeGen/fsgsbase-builtins.c | 4 +--- test/CodeGen/lzcnt-builtins.c | 4 +--- test/CodeGen/mmx-builtins.c | 6 ++---- test/CodeGen/pclmul-builtins.c | 4 +--- test/CodeGen/pku.c | 4 +--- test/CodeGen/popcnt-builtins.c | 4 +--- test/CodeGen/prefetchw-builtins.c | 4 +--- test/CodeGen/rd-builtins.c | 4 +--- test/CodeGen/rdrand-builtins.c | 4 +--- test/CodeGen/rtm-builtins.c | 4 +--- test/CodeGen/sha-builtins.c | 4 +--- test/CodeGen/sse-builtins.c | 4 +--- test/CodeGen/sse.c | 4 +--- test/CodeGen/sse2-builtins.c | 6 ++---- test/CodeGen/sse3-builtins.c | 4 +--- test/CodeGen/sse41-builtins.c | 6 ++---- test/CodeGen/sse42-builtins.c | 6 ++---- test/CodeGen/sse4a-builtins.c | 4 +--- test/CodeGen/ssse3-builtins.c | 4 +--- test/CodeGen/tbm-builtins.c | 4 +--- test/CodeGen/vector.c | 4 +--- test/CodeGen/xop-builtins.c | 6 ++---- 46 files changed, 57 insertions(+), 150 deletions(-) diff --git a/test/CodeGen/3dnow-builtins.c b/test/CodeGen/3dnow-builtins.c index 50e0e5d257..26e8700b9a 100644 --- a/test/CodeGen/3dnow-builtins.c +++ b/test/CodeGen/3dnow-builtins.c @@ -1,8 +1,6 @@ -// RUN: %clang_cc1 %s -triple=x86_64-unknown-unknown -target-feature +3dnowa -emit-llvm -o - -Wall -Werror | FileCheck %s -check-prefix=GCC -check-prefix=CHECK -// RUN: %clang_cc1 %s -triple=x86_64-scei-ps4 -target-feature +3dnowa -emit-llvm -o - -Wall -Werror | FileCheck %s -check-prefix=PS4 -check-prefix=CHECK +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-unknown-unknown -target-feature +3dnowa -emit-llvm -o - -Wall -Werror | FileCheck %s -check-prefix=GCC -check-prefix=CHECK +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-scei-ps4 -target-feature +3dnowa -emit-llvm -o - -Wall -Werror | FileCheck %s -check-prefix=PS4 -check-prefix=CHECK -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/avx-builtins.c b/test/CodeGen/avx-builtins.c index 8be03c3bf2..6a9f7c050b 100644 --- a/test/CodeGen/avx-builtins.c +++ b/test/CodeGen/avx-builtins.c @@ -1,8 +1,6 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +avx -emit-llvm -o - -Wall -Werror | FileCheck %s -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +avx -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/avx-cmp-builtins.c b/test/CodeGen/avx-cmp-builtins.c index 30d1bd5c7a..7d61942665 100644 --- a/test/CodeGen/avx-cmp-builtins.c +++ b/test/CodeGen/avx-cmp-builtins.c @@ -1,8 +1,6 @@ -// RUN: %clang_cc1 %s -O3 -triple=x86_64-apple-darwin -target-feature +avx -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -O3 -triple=x86_64-apple-darwin -target-feature +avx -emit-llvm -o - | FileCheck %s // FIXME: The shufflevector instructions in test_cmpgt_sd are relying on O3 here. -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/avx-shuffle-builtins.c b/test/CodeGen/avx-shuffle-builtins.c index 22bee33080..3d6c46d802 100644 --- a/test/CodeGen/avx-shuffle-builtins.c +++ b/test/CodeGen/avx-shuffle-builtins.c @@ -1,8 +1,6 @@ -// RUN: %clang_cc1 %s -O3 -triple=x86_64-apple-darwin -target-feature +avx -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -O3 -triple=x86_64-apple-darwin -target-feature +avx -emit-llvm -o - | FileCheck %s // FIXME: This is testing optimized generation of shuffle instructions and should be fixed. -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/avx2-builtins.c b/test/CodeGen/avx2-builtins.c index 4985337458..4ccf6e6da9 100644 --- a/test/CodeGen/avx2-builtins.c +++ b/test/CodeGen/avx2-builtins.c @@ -1,8 +1,6 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +avx2 -emit-llvm -o - -Wall -Werror | FileCheck %s -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +avx2 -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx2 -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx2 -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/avx512bw-builtins.c b/test/CodeGen/avx512bw-builtins.c index 2308cb2b1e..8d225d450f 100644 --- a/test/CodeGen/avx512bw-builtins.c +++ b/test/CodeGen/avx512bw-builtins.c @@ -1,8 +1,6 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +avx512bw -emit-llvm -o - -Wall -Werror | FileCheck %s -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +avx512bw -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512bw -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512bw -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/avx512cdintrin.c b/test/CodeGen/avx512cdintrin.c index b5860b74d2..a28601895b 100644 --- a/test/CodeGen/avx512cdintrin.c +++ b/test/CodeGen/avx512cdintrin.c @@ -1,7 +1,5 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +avx512cd -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512cd -emit-llvm -o - -Wall -Werror | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/avx512dq-builtins.c b/test/CodeGen/avx512dq-builtins.c index b842d07c32..5ad7738044 100644 --- a/test/CodeGen/avx512dq-builtins.c +++ b/test/CodeGen/avx512dq-builtins.c @@ -1,7 +1,5 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +avx512dq -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512dq -emit-llvm -o - -Wall -Werror | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/avx512er-builtins.c b/test/CodeGen/avx512er-builtins.c index 19b2edc271..084e0f5382 100644 --- a/test/CodeGen/avx512er-builtins.c +++ b/test/CodeGen/avx512er-builtins.c @@ -1,7 +1,5 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +avx512f -target-feature +avx512er -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512f -target-feature +avx512er -emit-llvm -o - -Wall -Werror | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/avx512f-builtins.c b/test/CodeGen/avx512f-builtins.c index 9500e6e463..2b711e296a 100644 --- a/test/CodeGen/avx512f-builtins.c +++ b/test/CodeGen/avx512f-builtins.c @@ -1,7 +1,4 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +avx512f -emit-llvm -o - -Wall -Werror | FileCheck %s - -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512f -emit-llvm -o - -Wall -Werror | FileCheck %s #include diff --git a/test/CodeGen/avx512ifma-builtins.c b/test/CodeGen/avx512ifma-builtins.c index d3114dd9cb..311d6989bf 100644 --- a/test/CodeGen/avx512ifma-builtins.c +++ b/test/CodeGen/avx512ifma-builtins.c @@ -1,7 +1,5 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +avx512ifma -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512ifma -emit-llvm -o - -Wall -Werror | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/avx512pf-builtins.c b/test/CodeGen/avx512pf-builtins.c index 4e00552d62..19ee083eae 100644 --- a/test/CodeGen/avx512pf-builtins.c +++ b/test/CodeGen/avx512pf-builtins.c @@ -1,7 +1,5 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +avx512pf -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512pf -emit-llvm -o - -Wall -Werror | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/avx512vbmi-builtins.c b/test/CodeGen/avx512vbmi-builtins.c index 74f86601fb..0816bce3a6 100644 --- a/test/CodeGen/avx512vbmi-builtins.c +++ b/test/CodeGen/avx512vbmi-builtins.c @@ -1,7 +1,5 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +avx512vbmi -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512vbmi -emit-llvm -o - -Wall -Werror | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/avx512vbmivl-builtin.c b/test/CodeGen/avx512vbmivl-builtin.c index bee66e3d63..b114720758 100644 --- a/test/CodeGen/avx512vbmivl-builtin.c +++ b/test/CodeGen/avx512vbmivl-builtin.c @@ -1,7 +1,5 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +avx512vbmi -target-feature +avx512vl -target-feature +avx512bw -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512vbmi -target-feature +avx512vl -target-feature +avx512bw -emit-llvm -o - -Wall -Werror | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/avx512vl-builtins.c b/test/CodeGen/avx512vl-builtins.c index 16310ca4b8..5150995468 100644 --- a/test/CodeGen/avx512vl-builtins.c +++ b/test/CodeGen/avx512vl-builtins.c @@ -1,7 +1,5 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +avx512f -target-feature +avx512vl -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512f -target-feature +avx512vl -emit-llvm -o - -Wall -Werror | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/avx512vlbw-builtins.c b/test/CodeGen/avx512vlbw-builtins.c index 506b0ab831..4fd878bb15 100644 --- a/test/CodeGen/avx512vlbw-builtins.c +++ b/test/CodeGen/avx512vlbw-builtins.c @@ -1,8 +1,6 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +avx512bw -target-feature +avx512vl -emit-llvm -o - -Wall -Werror | FileCheck %s -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +avx512bw -target-feature +avx512vl -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512bw -target-feature +avx512vl -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512bw -target-feature +avx512vl -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/avx512vlcd-builtins.c b/test/CodeGen/avx512vlcd-builtins.c index 9945d7bf6d..643f24f1d2 100644 --- a/test/CodeGen/avx512vlcd-builtins.c +++ b/test/CodeGen/avx512vlcd-builtins.c @@ -1,7 +1,5 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +avx512vl -target-feature +avx512cd -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512vl -target-feature +avx512cd -emit-llvm -o - -Wall -Werror | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/avx512vldq-builtins.c b/test/CodeGen/avx512vldq-builtins.c index 9b04441c38..1ac56ef449 100644 --- a/test/CodeGen/avx512vldq-builtins.c +++ b/test/CodeGen/avx512vldq-builtins.c @@ -1,7 +1,5 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +avx512dq -target-feature +avx512vl -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512dq -target-feature +avx512vl -emit-llvm -o - -Wall -Werror | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/bitscan-builtins.c b/test/CodeGen/bitscan-builtins.c index ae817e8157..71e49845f8 100644 --- a/test/CodeGen/bitscan-builtins.c +++ b/test/CodeGen/bitscan-builtins.c @@ -1,7 +1,5 @@ -// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -ffreestanding -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include int test_bit_scan_forward(int a) { diff --git a/test/CodeGen/bmi-builtins.c b/test/CodeGen/bmi-builtins.c index 1202d99d76..f78e3fdd4a 100644 --- a/test/CodeGen/bmi-builtins.c +++ b/test/CodeGen/bmi-builtins.c @@ -1,7 +1,5 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +bmi -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +bmi -emit-llvm -o - -Wall -Werror | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/bmi2-builtins.c b/test/CodeGen/bmi2-builtins.c index b4e3fec79a..3a5d5e756d 100644 --- a/test/CodeGen/bmi2-builtins.c +++ b/test/CodeGen/bmi2-builtins.c @@ -1,8 +1,6 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +bmi2 -emit-llvm -o - | FileCheck %s -// RUN: %clang_cc1 %s -triple=i386-apple-darwin -target-feature +bmi2 -emit-llvm -o - | FileCheck %s --check-prefix=B32 +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +bmi2 -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=i386-apple-darwin -target-feature +bmi2 -emit-llvm -o - | FileCheck %s --check-prefix=B32 -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/f16c-builtins.c b/test/CodeGen/f16c-builtins.c index 15c3bde22a..e4933e9f9b 100644 --- a/test/CodeGen/f16c-builtins.c +++ b/test/CodeGen/f16c-builtins.c @@ -1,7 +1,5 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +f16c -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +f16c -emit-llvm -o - -Wall -Werror | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/fma-builtins.c b/test/CodeGen/fma-builtins.c index 922f12b8b3..91a2efe763 100644 --- a/test/CodeGen/fma-builtins.c +++ b/test/CodeGen/fma-builtins.c @@ -1,7 +1,5 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +fma -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +fma -emit-llvm -o - | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/fma4-builtins.c b/test/CodeGen/fma4-builtins.c index 3edd18d07b..3ca5fac688 100644 --- a/test/CodeGen/fma4-builtins.c +++ b/test/CodeGen/fma4-builtins.c @@ -1,7 +1,5 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +fma4 -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +fma4 -emit-llvm -o - -Wall -Werror | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/fsgsbase-builtins.c b/test/CodeGen/fsgsbase-builtins.c index 5e9ba8c9dd..25f4b311a5 100644 --- a/test/CodeGen/fsgsbase-builtins.c +++ b/test/CodeGen/fsgsbase-builtins.c @@ -1,7 +1,5 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +fsgsbase -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +fsgsbase -emit-llvm -o - | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/lzcnt-builtins.c b/test/CodeGen/lzcnt-builtins.c index 2f8308670b..cc5d458c76 100644 --- a/test/CodeGen/lzcnt-builtins.c +++ b/test/CodeGen/lzcnt-builtins.c @@ -1,7 +1,5 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +lzcnt -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +lzcnt -emit-llvm -o - | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/mmx-builtins.c b/test/CodeGen/mmx-builtins.c index af4a1cdd88..ddc6f66548 100644 --- a/test/CodeGen/mmx-builtins.c +++ b/test/CodeGen/mmx-builtins.c @@ -1,8 +1,6 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +ssse3 -emit-llvm -o - -Wall -Werror | FileCheck %s -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +ssse3 -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +ssse3 -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +ssse3 -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/pclmul-builtins.c b/test/CodeGen/pclmul-builtins.c index ebca899037..44300f645a 100644 --- a/test/CodeGen/pclmul-builtins.c +++ b/test/CodeGen/pclmul-builtins.c @@ -1,7 +1,5 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +pclmul -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +pclmul -emit-llvm -o - | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/pku.c b/test/CodeGen/pku.c index d16576320b..cb02b03ffe 100644 --- a/test/CodeGen/pku.c +++ b/test/CodeGen/pku.c @@ -1,7 +1,5 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +pku -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +pku -emit-llvm -o - -Wall -Werror | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/popcnt-builtins.c b/test/CodeGen/popcnt-builtins.c index 5ae40c7a76..656a20f986 100644 --- a/test/CodeGen/popcnt-builtins.c +++ b/test/CodeGen/popcnt-builtins.c @@ -1,7 +1,5 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +popcnt -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +popcnt -emit-llvm -o - | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/prefetchw-builtins.c b/test/CodeGen/prefetchw-builtins.c index 8a50325ea1..53416de46f 100644 --- a/test/CodeGen/prefetchw-builtins.c +++ b/test/CodeGen/prefetchw-builtins.c @@ -1,7 +1,5 @@ -// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-feature +prfchw -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -ffreestanding -triple x86_64-unknown-unknown -target-feature +prfchw -emit-llvm -o - %s | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/rd-builtins.c b/test/CodeGen/rd-builtins.c index 5cad903909..0d7cd04d6f 100644 --- a/test/CodeGen/rd-builtins.c +++ b/test/CodeGen/rd-builtins.c @@ -1,7 +1,5 @@ -// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -ffreestanding -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/rdrand-builtins.c b/test/CodeGen/rdrand-builtins.c index 15414a3345..936502b774 100644 --- a/test/CodeGen/rdrand-builtins.c +++ b/test/CodeGen/rdrand-builtins.c @@ -1,7 +1,5 @@ -// RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-feature +rdrnd -target-feature +rdseed -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -ffreestanding -triple x86_64-unknown-unknown -target-feature +rdrnd -target-feature +rdseed -emit-llvm -o - %s | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/rtm-builtins.c b/test/CodeGen/rtm-builtins.c index 5cf3237d83..44952a07cd 100644 --- a/test/CodeGen/rtm-builtins.c +++ b/test/CodeGen/rtm-builtins.c @@ -1,7 +1,5 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +rtm -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +rtm -emit-llvm -o - | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/sha-builtins.c b/test/CodeGen/sha-builtins.c index 9c14a1ea7f..ede1a6bf7b 100644 --- a/test/CodeGen/sha-builtins.c +++ b/test/CodeGen/sha-builtins.c @@ -1,7 +1,5 @@ -// RUN: %clang_cc1 %s -triple=x86_64-unknown-unknown -target-feature +sha -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-unknown-unknown -target-feature +sha -emit-llvm -o - | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/sse-builtins.c b/test/CodeGen/sse-builtins.c index f952598877..27b016f665 100644 --- a/test/CodeGen/sse-builtins.c +++ b/test/CodeGen/sse-builtins.c @@ -1,7 +1,5 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +sse -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +sse -emit-llvm -o - -Wall -Werror | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/sse.c b/test/CodeGen/sse.c index 1e8c5dbe5d..1191f55f81 100644 --- a/test/CodeGen/sse.c +++ b/test/CodeGen/sse.c @@ -1,8 +1,6 @@ -// RUN: %clang_cc1 -O3 -triple x86_64-apple-macosx10.8.0 -target-feature +sse4.1 -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -ffreestanding -O3 -triple x86_64-apple-macosx10.8.0 -target-feature +sse4.1 -emit-llvm %s -o - | FileCheck %s // FIXME: This test currently depends on optimization - it should be rewritten to avoid it. -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/sse2-builtins.c b/test/CodeGen/sse2-builtins.c index 91fa737ef5..48c7036854 100644 --- a/test/CodeGen/sse2-builtins.c +++ b/test/CodeGen/sse2-builtins.c @@ -1,8 +1,6 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +sse2 -emit-llvm -o - -Wall -Werror | FileCheck %s -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +sse2 -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +sse2 -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +sse2 -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/sse3-builtins.c b/test/CodeGen/sse3-builtins.c index ee6ff8d011..46a7bbbb91 100644 --- a/test/CodeGen/sse3-builtins.c +++ b/test/CodeGen/sse3-builtins.c @@ -1,7 +1,5 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +sse3 -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +sse3 -emit-llvm -o - -Wall -Werror | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/sse41-builtins.c b/test/CodeGen/sse41-builtins.c index 09d0a4b6f0..adf9609b68 100644 --- a/test/CodeGen/sse41-builtins.c +++ b/test/CodeGen/sse41-builtins.c @@ -1,8 +1,6 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +sse4.1 -emit-llvm -o - -Wall -Werror | FileCheck %s -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +sse4.1 -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +sse4.1 -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +sse4.1 -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/sse42-builtins.c b/test/CodeGen/sse42-builtins.c index 7a76293f05..523db1a341 100644 --- a/test/CodeGen/sse42-builtins.c +++ b/test/CodeGen/sse42-builtins.c @@ -1,8 +1,6 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +sse4.2 -emit-llvm -o - -Wall -Werror | FileCheck %s -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +sse4.2 -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +sse4.2 -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +sse4.2 -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/sse4a-builtins.c b/test/CodeGen/sse4a-builtins.c index 9367227b02..3d36a7dfa0 100644 --- a/test/CodeGen/sse4a-builtins.c +++ b/test/CodeGen/sse4a-builtins.c @@ -1,7 +1,5 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +sse4a -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +sse4a -emit-llvm -o - -Wall -Werror | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/ssse3-builtins.c b/test/CodeGen/ssse3-builtins.c index e6c2053161..b2279e277c 100644 --- a/test/CodeGen/ssse3-builtins.c +++ b/test/CodeGen/ssse3-builtins.c @@ -1,7 +1,5 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +ssse3 -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +ssse3 -emit-llvm -o - -Wall -Werror | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/tbm-builtins.c b/test/CodeGen/tbm-builtins.c index c8a9382ed1..8e031408a4 100644 --- a/test/CodeGen/tbm-builtins.c +++ b/test/CodeGen/tbm-builtins.c @@ -1,10 +1,8 @@ -// RUN: %clang_cc1 %s -O3 -triple=x86_64-unknown-unknown -target-feature +tbm -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -O3 -triple=x86_64-unknown-unknown -target-feature +tbm -emit-llvm -o - | FileCheck %s // FIXME: The code generation checks for add/sub and/or are depending on the optimizer. // The REQUIRES keyword will be removed when the FIXME is complete. // REQUIRES: x86-registered-target -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/vector.c b/test/CodeGen/vector.c index 14f5079726..ebaea841aa 100644 --- a/test/CodeGen/vector.c +++ b/test/CodeGen/vector.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple i386-apple-darwin9 -O1 -target-cpu core2 -debug-info-kind=limited -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -ffreestanding -triple i386-apple-darwin9 -O1 -target-cpu core2 -debug-info-kind=limited -emit-llvm %s -o - | FileCheck %s typedef short __v4hi __attribute__ ((__vector_size__ (8))); void test1() { @@ -20,8 +20,6 @@ void test3 ( vec4* a, char b, float c ) { -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include diff --git a/test/CodeGen/xop-builtins.c b/test/CodeGen/xop-builtins.c index 09ceb20176..da9a3b925d 100644 --- a/test/CodeGen/xop-builtins.c +++ b/test/CodeGen/xop-builtins.c @@ -1,8 +1,6 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +xop -emit-llvm -o - -Wall -Werror | FileCheck %s -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -target-feature +xop -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -emit-llvm -o - -Wall -Werror | FileCheck %s +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s -// Don't include mm_malloc.h, it's system specific. -#define __MM_MALLOC_H #include -- 2.40.0