From b107a22afbd2a5a07259c56b7ce84450fe7c8783 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 llvm-svn: 282581 --- clang/test/CodeGen/3dnow-builtins.c | 6 ++---- clang/test/CodeGen/avx-builtins.c | 6 ++---- clang/test/CodeGen/avx-cmp-builtins.c | 4 +--- clang/test/CodeGen/avx-shuffle-builtins.c | 4 +--- clang/test/CodeGen/avx2-builtins.c | 6 ++---- clang/test/CodeGen/avx512bw-builtins.c | 6 ++---- clang/test/CodeGen/avx512cdintrin.c | 4 +--- clang/test/CodeGen/avx512dq-builtins.c | 4 +--- clang/test/CodeGen/avx512er-builtins.c | 4 +--- clang/test/CodeGen/avx512f-builtins.c | 5 +---- clang/test/CodeGen/avx512ifma-builtins.c | 4 +--- clang/test/CodeGen/avx512pf-builtins.c | 4 +--- clang/test/CodeGen/avx512vbmi-builtins.c | 4 +--- clang/test/CodeGen/avx512vbmivl-builtin.c | 4 +--- clang/test/CodeGen/avx512vl-builtins.c | 4 +--- clang/test/CodeGen/avx512vlbw-builtins.c | 6 ++---- clang/test/CodeGen/avx512vlcd-builtins.c | 4 +--- clang/test/CodeGen/avx512vldq-builtins.c | 4 +--- clang/test/CodeGen/bitscan-builtins.c | 4 +--- clang/test/CodeGen/bmi-builtins.c | 4 +--- clang/test/CodeGen/bmi2-builtins.c | 6 ++---- clang/test/CodeGen/f16c-builtins.c | 4 +--- clang/test/CodeGen/fma-builtins.c | 4 +--- clang/test/CodeGen/fma4-builtins.c | 4 +--- clang/test/CodeGen/fsgsbase-builtins.c | 4 +--- clang/test/CodeGen/lzcnt-builtins.c | 4 +--- clang/test/CodeGen/mmx-builtins.c | 6 ++---- clang/test/CodeGen/pclmul-builtins.c | 4 +--- clang/test/CodeGen/pku.c | 4 +--- clang/test/CodeGen/popcnt-builtins.c | 4 +--- clang/test/CodeGen/prefetchw-builtins.c | 4 +--- clang/test/CodeGen/rd-builtins.c | 4 +--- clang/test/CodeGen/rdrand-builtins.c | 4 +--- clang/test/CodeGen/rtm-builtins.c | 4 +--- clang/test/CodeGen/sha-builtins.c | 4 +--- clang/test/CodeGen/sse-builtins.c | 4 +--- clang/test/CodeGen/sse.c | 4 +--- clang/test/CodeGen/sse2-builtins.c | 6 ++---- clang/test/CodeGen/sse3-builtins.c | 4 +--- clang/test/CodeGen/sse41-builtins.c | 6 ++---- clang/test/CodeGen/sse42-builtins.c | 6 ++---- clang/test/CodeGen/sse4a-builtins.c | 4 +--- clang/test/CodeGen/ssse3-builtins.c | 4 +--- clang/test/CodeGen/tbm-builtins.c | 4 +--- clang/test/CodeGen/vector.c | 4 +--- clang/test/CodeGen/xop-builtins.c | 6 ++---- 46 files changed, 57 insertions(+), 150 deletions(-) diff --git a/clang/test/CodeGen/3dnow-builtins.c b/clang/test/CodeGen/3dnow-builtins.c index 50e0e5d2578e..26e8700b9a2c 100644 --- a/clang/test/CodeGen/3dnow-builtins.c +++ b/clang/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/clang/test/CodeGen/avx-builtins.c b/clang/test/CodeGen/avx-builtins.c index 8be03c3bf282..6a9f7c050b32 100644 --- a/clang/test/CodeGen/avx-builtins.c +++ b/clang/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/clang/test/CodeGen/avx-cmp-builtins.c b/clang/test/CodeGen/avx-cmp-builtins.c index 30d1bd5c7aa0..7d619426653d 100644 --- a/clang/test/CodeGen/avx-cmp-builtins.c +++ b/clang/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/clang/test/CodeGen/avx-shuffle-builtins.c b/clang/test/CodeGen/avx-shuffle-builtins.c index 22bee33080a9..3d6c46d8027f 100644 --- a/clang/test/CodeGen/avx-shuffle-builtins.c +++ b/clang/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/clang/test/CodeGen/avx2-builtins.c b/clang/test/CodeGen/avx2-builtins.c index 49853374581d..4ccf6e6da97b 100644 --- a/clang/test/CodeGen/avx2-builtins.c +++ b/clang/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/clang/test/CodeGen/avx512bw-builtins.c b/clang/test/CodeGen/avx512bw-builtins.c index 2308cb2b1e86..8d225d450fad 100644 --- a/clang/test/CodeGen/avx512bw-builtins.c +++ b/clang/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/clang/test/CodeGen/avx512cdintrin.c b/clang/test/CodeGen/avx512cdintrin.c index b5860b74d21b..a28601895be1 100644 --- a/clang/test/CodeGen/avx512cdintrin.c +++ b/clang/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/clang/test/CodeGen/avx512dq-builtins.c b/clang/test/CodeGen/avx512dq-builtins.c index b842d07c3206..5ad773804413 100644 --- a/clang/test/CodeGen/avx512dq-builtins.c +++ b/clang/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/clang/test/CodeGen/avx512er-builtins.c b/clang/test/CodeGen/avx512er-builtins.c index 19b2edc2714d..084e0f53825c 100644 --- a/clang/test/CodeGen/avx512er-builtins.c +++ b/clang/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/clang/test/CodeGen/avx512f-builtins.c b/clang/test/CodeGen/avx512f-builtins.c index 9500e6e4636b..2b711e296a80 100644 --- a/clang/test/CodeGen/avx512f-builtins.c +++ b/clang/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/clang/test/CodeGen/avx512ifma-builtins.c b/clang/test/CodeGen/avx512ifma-builtins.c index d3114dd9cb69..311d6989bf0d 100644 --- a/clang/test/CodeGen/avx512ifma-builtins.c +++ b/clang/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/clang/test/CodeGen/avx512pf-builtins.c b/clang/test/CodeGen/avx512pf-builtins.c index 4e00552d620f..19ee083eae2d 100644 --- a/clang/test/CodeGen/avx512pf-builtins.c +++ b/clang/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/clang/test/CodeGen/avx512vbmi-builtins.c b/clang/test/CodeGen/avx512vbmi-builtins.c index 74f86601fb82..0816bce3a6de 100644 --- a/clang/test/CodeGen/avx512vbmi-builtins.c +++ b/clang/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/clang/test/CodeGen/avx512vbmivl-builtin.c b/clang/test/CodeGen/avx512vbmivl-builtin.c index bee66e3d63c8..b114720758aa 100644 --- a/clang/test/CodeGen/avx512vbmivl-builtin.c +++ b/clang/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/clang/test/CodeGen/avx512vl-builtins.c b/clang/test/CodeGen/avx512vl-builtins.c index 16310ca4b8c4..51509954680e 100644 --- a/clang/test/CodeGen/avx512vl-builtins.c +++ b/clang/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/clang/test/CodeGen/avx512vlbw-builtins.c b/clang/test/CodeGen/avx512vlbw-builtins.c index 506b0ab83181..4fd878bb15d8 100644 --- a/clang/test/CodeGen/avx512vlbw-builtins.c +++ b/clang/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/clang/test/CodeGen/avx512vlcd-builtins.c b/clang/test/CodeGen/avx512vlcd-builtins.c index 9945d7bf6df7..643f24f1d22c 100644 --- a/clang/test/CodeGen/avx512vlcd-builtins.c +++ b/clang/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/clang/test/CodeGen/avx512vldq-builtins.c b/clang/test/CodeGen/avx512vldq-builtins.c index 9b04441c380c..1ac56ef4493c 100644 --- a/clang/test/CodeGen/avx512vldq-builtins.c +++ b/clang/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/clang/test/CodeGen/bitscan-builtins.c b/clang/test/CodeGen/bitscan-builtins.c index ae817e815749..71e49845f896 100644 --- a/clang/test/CodeGen/bitscan-builtins.c +++ b/clang/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/clang/test/CodeGen/bmi-builtins.c b/clang/test/CodeGen/bmi-builtins.c index 1202d99d7613..f78e3fdd4a17 100644 --- a/clang/test/CodeGen/bmi-builtins.c +++ b/clang/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/clang/test/CodeGen/bmi2-builtins.c b/clang/test/CodeGen/bmi2-builtins.c index b4e3fec79a47..3a5d5e756ddb 100644 --- a/clang/test/CodeGen/bmi2-builtins.c +++ b/clang/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/clang/test/CodeGen/f16c-builtins.c b/clang/test/CodeGen/f16c-builtins.c index 15c3bde22a8b..e4933e9f9bf3 100644 --- a/clang/test/CodeGen/f16c-builtins.c +++ b/clang/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/clang/test/CodeGen/fma-builtins.c b/clang/test/CodeGen/fma-builtins.c index 922f12b8b3d3..91a2efe7637e 100644 --- a/clang/test/CodeGen/fma-builtins.c +++ b/clang/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/clang/test/CodeGen/fma4-builtins.c b/clang/test/CodeGen/fma4-builtins.c index 3edd18d07ba3..3ca5fac68892 100644 --- a/clang/test/CodeGen/fma4-builtins.c +++ b/clang/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/clang/test/CodeGen/fsgsbase-builtins.c b/clang/test/CodeGen/fsgsbase-builtins.c index 5e9ba8c9dde4..25f4b311a596 100644 --- a/clang/test/CodeGen/fsgsbase-builtins.c +++ b/clang/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/clang/test/CodeGen/lzcnt-builtins.c b/clang/test/CodeGen/lzcnt-builtins.c index 2f8308670bb7..cc5d458c7630 100644 --- a/clang/test/CodeGen/lzcnt-builtins.c +++ b/clang/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/clang/test/CodeGen/mmx-builtins.c b/clang/test/CodeGen/mmx-builtins.c index af4a1cdd88ca..ddc6f66548ae 100644 --- a/clang/test/CodeGen/mmx-builtins.c +++ b/clang/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/clang/test/CodeGen/pclmul-builtins.c b/clang/test/CodeGen/pclmul-builtins.c index ebca89903747..44300f645a9d 100644 --- a/clang/test/CodeGen/pclmul-builtins.c +++ b/clang/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/clang/test/CodeGen/pku.c b/clang/test/CodeGen/pku.c index d16576320bbe..cb02b03ffe0e 100644 --- a/clang/test/CodeGen/pku.c +++ b/clang/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/clang/test/CodeGen/popcnt-builtins.c b/clang/test/CodeGen/popcnt-builtins.c index 5ae40c7a7688..656a20f98605 100644 --- a/clang/test/CodeGen/popcnt-builtins.c +++ b/clang/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/clang/test/CodeGen/prefetchw-builtins.c b/clang/test/CodeGen/prefetchw-builtins.c index 8a50325ea18f..53416de46ff4 100644 --- a/clang/test/CodeGen/prefetchw-builtins.c +++ b/clang/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/clang/test/CodeGen/rd-builtins.c b/clang/test/CodeGen/rd-builtins.c index 5cad90390941..0d7cd04d6f26 100644 --- a/clang/test/CodeGen/rd-builtins.c +++ b/clang/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/clang/test/CodeGen/rdrand-builtins.c b/clang/test/CodeGen/rdrand-builtins.c index 15414a334580..936502b77483 100644 --- a/clang/test/CodeGen/rdrand-builtins.c +++ b/clang/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/clang/test/CodeGen/rtm-builtins.c b/clang/test/CodeGen/rtm-builtins.c index 5cf3237d83e8..44952a07cd77 100644 --- a/clang/test/CodeGen/rtm-builtins.c +++ b/clang/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/clang/test/CodeGen/sha-builtins.c b/clang/test/CodeGen/sha-builtins.c index 9c14a1ea7f0a..ede1a6bf7b1f 100644 --- a/clang/test/CodeGen/sha-builtins.c +++ b/clang/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/clang/test/CodeGen/sse-builtins.c b/clang/test/CodeGen/sse-builtins.c index f9525988779f..27b016f66517 100644 --- a/clang/test/CodeGen/sse-builtins.c +++ b/clang/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/clang/test/CodeGen/sse.c b/clang/test/CodeGen/sse.c index 1e8c5dbe5dec..1191f55f81e7 100644 --- a/clang/test/CodeGen/sse.c +++ b/clang/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/clang/test/CodeGen/sse2-builtins.c b/clang/test/CodeGen/sse2-builtins.c index 91fa737ef5a7..48c703685479 100644 --- a/clang/test/CodeGen/sse2-builtins.c +++ b/clang/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/clang/test/CodeGen/sse3-builtins.c b/clang/test/CodeGen/sse3-builtins.c index ee6ff8d011a1..46a7bbbb91e2 100644 --- a/clang/test/CodeGen/sse3-builtins.c +++ b/clang/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/clang/test/CodeGen/sse41-builtins.c b/clang/test/CodeGen/sse41-builtins.c index 09d0a4b6f045..adf9609b68f9 100644 --- a/clang/test/CodeGen/sse41-builtins.c +++ b/clang/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/clang/test/CodeGen/sse42-builtins.c b/clang/test/CodeGen/sse42-builtins.c index 7a76293f05b2..523db1a3416e 100644 --- a/clang/test/CodeGen/sse42-builtins.c +++ b/clang/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/clang/test/CodeGen/sse4a-builtins.c b/clang/test/CodeGen/sse4a-builtins.c index 9367227b025f..3d36a7dfa007 100644 --- a/clang/test/CodeGen/sse4a-builtins.c +++ b/clang/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/clang/test/CodeGen/ssse3-builtins.c b/clang/test/CodeGen/ssse3-builtins.c index e6c2053161ea..b2279e277cd2 100644 --- a/clang/test/CodeGen/ssse3-builtins.c +++ b/clang/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/clang/test/CodeGen/tbm-builtins.c b/clang/test/CodeGen/tbm-builtins.c index c8a9382ed17d..8e031408a4b6 100644 --- a/clang/test/CodeGen/tbm-builtins.c +++ b/clang/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/clang/test/CodeGen/vector.c b/clang/test/CodeGen/vector.c index 14f507972639..ebaea841aa85 100644 --- a/clang/test/CodeGen/vector.c +++ b/clang/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/clang/test/CodeGen/xop-builtins.c b/clang/test/CodeGen/xop-builtins.c index 09ceb2017647..da9a3b925de2 100644 --- a/clang/test/CodeGen/xop-builtins.c +++ b/clang/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