Tests: check for target availability for target-specific tests.
Lots of tests are using an explicit target triple w/o first checking that the
target is actually available. Add a REQUIRES clause to a bunch of them. This should
hopefully unbreak bots which don't configure w/ all targets enabled.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159949 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/2009-02-13-zerosize-union-field-ppc.c b/test/CodeGen/2009-02-13-zerosize-union-field-ppc.c
index 8787bd4..2bcc7c3 100644
--- a/test/CodeGen/2009-02-13-zerosize-union-field-ppc.c
+++ b/test/CodeGen/2009-02-13-zerosize-union-field-ppc.c
@@ -1,3 +1,4 @@
+// REQUIRES: ppc32-registered-target
// RUN: %clang_cc1 %s -triple powerpc-pc-linux -emit-llvm -o - | grep {i32 32} | count 3
// XFAIL: *
// Every printf has 'i32 0' for the GEP of the string; no point counting those.
diff --git a/test/CodeGen/2010-05-26-AsmSideEffect.c b/test/CodeGen/2010-05-26-AsmSideEffect.c
index 7dd86ae..8ae7cb5 100644
--- a/test/CodeGen/2010-05-26-AsmSideEffect.c
+++ b/test/CodeGen/2010-05-26-AsmSideEffect.c
@@ -1,3 +1,4 @@
+// REQUIRES: arm-registered-target
// RUN: %clang_cc1 %s -emit-llvm -triple arm-apple-darwin -o - | FileCheck %s
// Radar 8026855
diff --git a/test/CodeGen/altivec.c b/test/CodeGen/altivec.c
index 2982303..6c924a7 100644
--- a/test/CodeGen/altivec.c
+++ b/test/CodeGen/altivec.c
@@ -1,3 +1,4 @@
+// REQUIRES: ppc32-registered-target
// RUN: %clang_cc1 -faltivec -triple powerpc-unknown-unknown -emit-llvm %s -o - | FileCheck %s
// Check initialization
diff --git a/test/CodeGen/arm-aapcs-vfp.c b/test/CodeGen/arm-aapcs-vfp.c
index 017c145..45204ed 100644
--- a/test/CodeGen/arm-aapcs-vfp.c
+++ b/test/CodeGen/arm-aapcs-vfp.c
@@ -1,3 +1,4 @@
+// REQUIRES: arm-registered-target
// RUN: %clang_cc1 -triple thumbv7-apple-darwin9 \
// RUN: -target-abi aapcs \
// RUN: -target-cpu cortex-a8 \
diff --git a/test/CodeGen/arm-aapcs-zerolength-bitfield.c b/test/CodeGen/arm-aapcs-zerolength-bitfield.c
index 9fece19..140ff6c 100644
--- a/test/CodeGen/arm-aapcs-zerolength-bitfield.c
+++ b/test/CodeGen/arm-aapcs-zerolength-bitfield.c
@@ -1,3 +1,4 @@
+// REQUIRES: arm-registered-target
// RUN: %clang_cc1 -target-abi aapcs -triple armv7-apple-darwin10 %s -verify
#include <stddef.h>
diff --git a/test/CodeGen/arm-apcs-zerolength-bitfield.c b/test/CodeGen/arm-apcs-zerolength-bitfield.c
index 3f94525..049ffae 100644
--- a/test/CodeGen/arm-apcs-zerolength-bitfield.c
+++ b/test/CodeGen/arm-apcs-zerolength-bitfield.c
@@ -1,3 +1,4 @@
+// REQUIRES: arm-registered-target
// RUN: %clang_cc1 -target-abi apcs-gnu -triple armv7-apple-darwin10 %s -verify
//
// Note: gcc forces the alignment to 4 bytes, regardless of the type of the
diff --git a/test/CodeGen/arm-arguments.c b/test/CodeGen/arm-arguments.c
index 4686d4a..1ca9a78 100644
--- a/test/CodeGen/arm-arguments.c
+++ b/test/CodeGen/arm-arguments.c
@@ -1,3 +1,4 @@
+// REQUIRES: arm-registered-target
// RUN: %clang_cc1 -triple armv7-apple-darwin9 -target-abi apcs-gnu -emit-llvm -w -o - %s | FileCheck -check-prefix=APCS-GNU %s
// RUN: %clang_cc1 -triple armv7-apple-darwin9 -target-abi aapcs -emit-llvm -w -o - %s | FileCheck -check-prefix=AAPCS %s
diff --git a/test/CodeGen/arm-asm-variable.c b/test/CodeGen/arm-asm-variable.c
index 865d197..f874269 100644
--- a/test/CodeGen/arm-asm-variable.c
+++ b/test/CodeGen/arm-asm-variable.c
@@ -1,3 +1,4 @@
+// REQUIRES: arm-registered-target
// RUN: %clang_cc1 -triple armv7-apple-darwin9 -emit-llvm -w -o - %s | FileCheck %s
typedef long long int64_t;
diff --git a/test/CodeGen/arm-asm.c b/test/CodeGen/arm-asm.c
index 9b1082a..bd2fe11 100644
--- a/test/CodeGen/arm-asm.c
+++ b/test/CodeGen/arm-asm.c
@@ -1,3 +1,4 @@
+// REQUIRES: arm-registered-target
// RUN: %clang_cc1 -triple thumb %s -emit-llvm -o - | FileCheck %s
int t1() {
static float k = 1.0f;
diff --git a/test/CodeGen/arm-cc.c b/test/CodeGen/arm-cc.c
index 74eecc7..80ebe68 100644
--- a/test/CodeGen/arm-cc.c
+++ b/test/CodeGen/arm-cc.c
@@ -1,3 +1,4 @@
+// REQUIRES: arm-registered-target
// RUN: %clang_cc1 -triple armv7-apple-darwin9 -target-abi apcs-gnu -emit-llvm -w -o - %s | FileCheck -check-prefix=DARWIN-APCS %s
// RUN: %clang_cc1 -triple armv7-apple-darwin9 -target-abi aapcs -emit-llvm -w -o - %s | FileCheck -check-prefix=DARWIN-AAPCS %s
// RUN: %clang_cc1 -triple arm-none-linux-gnueabi -target-abi apcs-gnu -emit-llvm -w -o - %s | FileCheck -check-prefix=LINUX-APCS %s
diff --git a/test/CodeGen/arm-clear.c b/test/CodeGen/arm-clear.c
index eda64ce..51506df 100644
--- a/test/CodeGen/arm-clear.c
+++ b/test/CodeGen/arm-clear.c
@@ -1,3 +1,4 @@
+// REQUIRES: arm-registered-target
// RUN: %clang_cc1 -triple armv7-apple-darwin9 -emit-llvm -w -o - %s | FileCheck %s
void clear0(void *ptr) {
diff --git a/test/CodeGen/arm-homogenous.c b/test/CodeGen/arm-homogenous.c
index eb3d5a6..b8d046a 100644
--- a/test/CodeGen/arm-homogenous.c
+++ b/test/CodeGen/arm-homogenous.c
@@ -1,3 +1,4 @@
+// REQUIRES: arm-registered-target
// RUN: %clang_cc1 -triple armv7---eabi -target-abi aapcs -mfloat-abi hard -emit-llvm %s -o - | FileCheck %s
typedef long long int64_t;
@@ -157,4 +158,4 @@
// FIXME: Tests necessary:
// - Vectors
-// - C++ stuff
\ No newline at end of file
+// - C++ stuff
diff --git a/test/CodeGen/arm-inline-asm.c b/test/CodeGen/arm-inline-asm.c
index 0152b05..95bb507 100644
--- a/test/CodeGen/arm-inline-asm.c
+++ b/test/CodeGen/arm-inline-asm.c
@@ -1,3 +1,4 @@
+// REQUIRES: arm-registered-target
// RUN: %clang_cc1 -triple armv7-apple-darwin9 -emit-llvm -w -o - %s | FileCheck %s
void t1 (void *f, int g) {
diff --git a/test/CodeGen/arm-pcs.c b/test/CodeGen/arm-pcs.c
index d722f84..fc658c3 100644
--- a/test/CodeGen/arm-pcs.c
+++ b/test/CodeGen/arm-pcs.c
@@ -1,3 +1,4 @@
+// REQUIRES: arm-registered-target
// RUN: %clang_cc1 -triple arm-none-linux-gnueabi -emit-llvm -w -o - < %s | FileCheck %s
typedef int __attribute__((pcs("aapcs"))) (*aapcs_fn)(void);
typedef int __attribute__((pcs("aapcs-vfp"))) (*aapcs_vfp_fn)(void);
diff --git a/test/CodeGen/arm-vaarg-align.c b/test/CodeGen/arm-vaarg-align.c
index 1187c02..2270c8b 100644
--- a/test/CodeGen/arm-vaarg-align.c
+++ b/test/CodeGen/arm-vaarg-align.c
@@ -1,3 +1,4 @@
+// REQUIRES: arm-registered-target
// RUN: %clang_cc1 -triple arm -target-abi aapcs %s -emit-llvm -o - | FileCheck -check-prefix=AAPCS %s
// RUN: %clang_cc1 -triple arm -target-abi apcs-gnu %s -emit-llvm -o - | FileCheck -check-prefix=APCS-GNU %s
/*
diff --git a/test/CodeGen/arm-vector-align.c b/test/CodeGen/arm-vector-align.c
index b481a0c..9e1ae5d 100644
--- a/test/CodeGen/arm-vector-align.c
+++ b/test/CodeGen/arm-vector-align.c
@@ -1,3 +1,4 @@
+// REQUIRES: arm-registered-target
// RUN: %clang_cc1 -triple thumbv7-apple-darwin \
// RUN: -target-abi apcs-gnu \
// RUN: -target-cpu cortex-a8 \
diff --git a/test/CodeGen/arm-vector-arguments.c b/test/CodeGen/arm-vector-arguments.c
index 6bfb2f4..9bdddb7 100644
--- a/test/CodeGen/arm-vector-arguments.c
+++ b/test/CodeGen/arm-vector-arguments.c
@@ -1,3 +1,4 @@
+// REQUIRES: arm-registered-target
// RUN: %clang_cc1 -triple thumbv7-apple-darwin9 \
// RUN: -target-abi apcs-gnu \
// RUN: -target-cpu cortex-a8 \
diff --git a/test/CodeGen/asm_arm.c b/test/CodeGen/asm_arm.c
index 633bf55..4b764b7 100644
--- a/test/CodeGen/asm_arm.c
+++ b/test/CodeGen/asm_arm.c
@@ -1,3 +1,4 @@
+// REQUIRES: arm-registered-target
// RUN: %clang_cc1 -triple armv6-unknown-unknown -emit-llvm -o - %s | FileCheck %s
void test0(void) {
diff --git a/test/CodeGen/bool_test.c b/test/CodeGen/bool_test.c
index ffaaef8..715f846 100644
--- a/test/CodeGen/bool_test.c
+++ b/test/CodeGen/bool_test.c
@@ -1,3 +1,4 @@
+// REQUIRES: ppc32-registered-target
// RUN: %clang_cc1 -triple powerpc-apple-darwin -emit-llvm -o - %s| FileCheck -check-prefix=DARWINPPC-CHECK %s
int boolsize = sizeof(_Bool);
diff --git a/test/CodeGen/builtin-attributes.c b/test/CodeGen/builtin-attributes.c
index 3781eba..1d3a943 100644
--- a/test/CodeGen/builtin-attributes.c
+++ b/test/CodeGen/builtin-attributes.c
@@ -1,3 +1,4 @@
+// REQUIRES: arm-registered-target
// RUN: %clang_cc1 -triple arm-unknown-linux-gnueabi -emit-llvm -o - %s | FileCheck %s
// CHECK: declare i32 @printf(i8*, ...)
diff --git a/test/CodeGen/builtins-arm.c b/test/CodeGen/builtins-arm.c
index 09df1ef..3611650 100644
--- a/test/CodeGen/builtins-arm.c
+++ b/test/CodeGen/builtins-arm.c
@@ -1,3 +1,4 @@
+// REQUIRES: arm-registered-target
// RUN: %clang_cc1 -Wall -Werror -triple thumbv7-eabi -target-cpu cortex-a8 -O3 -emit-llvm -o - %s | FileCheck %s
void *f0()
diff --git a/test/CodeGen/builtins-mips-args.c b/test/CodeGen/builtins-mips-args.c
index 4bc6f24..a961b36 100644
--- a/test/CodeGen/builtins-mips-args.c
+++ b/test/CodeGen/builtins-mips-args.c
@@ -1,3 +1,4 @@
+// REQUIRES: mips-registered-target
// RUN: %clang_cc1 -triple mips-unknown-linux-gnu -fsyntax-only -verify %s
void foo() {
diff --git a/test/CodeGen/builtins-mips.c b/test/CodeGen/builtins-mips.c
index 8a848af..a341462 100644
--- a/test/CodeGen/builtins-mips.c
+++ b/test/CodeGen/builtins-mips.c
@@ -1,3 +1,4 @@
+// REQUIRES: mips-registered-target
// RUN: %clang_cc1 -triple mips-unknown-linux-gnu -emit-llvm -o %t %s
// RUN: not grep __builtin %t
diff --git a/test/CodeGen/builtins-ppc-altivec.c b/test/CodeGen/builtins-ppc-altivec.c
index b12ff01..e885cb0 100644
--- a/test/CodeGen/builtins-ppc-altivec.c
+++ b/test/CodeGen/builtins-ppc-altivec.c
@@ -1,3 +1,4 @@
+// REQUIRES: ppc32-registered-target
// RUN: %clang_cc1 -faltivec -triple powerpc-unknown-unknown -emit-llvm %s -o - | FileCheck %s
vector bool char vbc = { 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 };
diff --git a/test/CodeGen/fp16-ops.c b/test/CodeGen/fp16-ops.c
index cbbfb884..e506513 100644
--- a/test/CodeGen/fp16-ops.c
+++ b/test/CodeGen/fp16-ops.c
@@ -1,3 +1,4 @@
+// REQUIRES: arm-registered-target
// RUN: %clang_cc1 -emit-llvm -o - -triple arm-none-linux-gnueabi %s | FileCheck %s
typedef unsigned cond_t;
diff --git a/test/CodeGen/no-common.c b/test/CodeGen/no-common.c
index 7beefc7..8d2c4d7 100644
--- a/test/CodeGen/no-common.c
+++ b/test/CodeGen/no-common.c
@@ -12,4 +12,4 @@
// CHECK-DEFAULT: @y = common global
// CHECK-NOCOMMON: @y = common global
-int y __attribute__((common));
\ No newline at end of file
+int y __attribute__((common));
diff --git a/test/CodeGen/powerpc_types.c b/test/CodeGen/powerpc_types.c
index b7d0f5d..b4de318 100644
--- a/test/CodeGen/powerpc_types.c
+++ b/test/CodeGen/powerpc_types.c
@@ -1,3 +1,4 @@
+// REQUIRES: ppc32-registered-target
// RUN: %clang_cc1 -triple powerpc-unknown-freebsd -emit-llvm -o - %s| FileCheck -check-prefix=SVR4-CHECK %s
#include <stdarg.h>
diff --git a/test/CodeGen/pr5406.c b/test/CodeGen/pr5406.c
index da74d6b..2d19822 100644
--- a/test/CodeGen/pr5406.c
+++ b/test/CodeGen/pr5406.c
@@ -1,3 +1,4 @@
+// REQUIRES: arm-registered-target
// RUN: %clang_cc1 %s -emit-llvm -triple arm-apple-darwin -o - | FileCheck %s
// PR 5406
diff --git a/test/CodeGen/struct-init.c b/test/CodeGen/struct-init.c
index 6247729..5273138 100644
--- a/test/CodeGen/struct-init.c
+++ b/test/CodeGen/struct-init.c
@@ -1,3 +1,4 @@
+// REQUIRES: arm-registered-target
// RUN: %clang_cc1 -S -triple armv7-apple-darwin %s -emit-llvm -o - | FileCheck %s
typedef struct _zend_ini_entry zend_ini_entry;
diff --git a/test/CodeGen/struct-matching-constraint.c b/test/CodeGen/struct-matching-constraint.c
index 40c444f..bdd11c8 100644
--- a/test/CodeGen/struct-matching-constraint.c
+++ b/test/CodeGen/struct-matching-constraint.c
@@ -1,3 +1,4 @@
+// REQUIRES: arm-registered-target
// RUN: %clang_cc1 -S -emit-llvm -triple armv7a-apple-darwin %s -o /dev/null
typedef unsigned short uint16_t;
typedef __attribute__((neon_vector_type(8))) uint16_t uint16x8_t;
diff --git a/test/CodeGen/vld_dup.c b/test/CodeGen/vld_dup.c
index e1d63cc..2bc2519 100644
--- a/test/CodeGen/vld_dup.c
+++ b/test/CodeGen/vld_dup.c
@@ -1,3 +1,4 @@
+// REQUIRES: arm-registered-target
// RUN: %clang_cc1 -triple armv7a-linux-gnueabi \
// RUN: -target-cpu cortex-a8 \
// RUN: -emit-llvm -O0 -o - %s | FileCheck %s
diff --git a/test/Driver/mips-features.c b/test/Driver/mips-features.c
index e5f735e..5be2683 100644
--- a/test/Driver/mips-features.c
+++ b/test/Driver/mips-features.c
@@ -1,3 +1,5 @@
+// REQUIRES: mips-registered-target
+//
// Check handling MIPS specific features options.
//
// -mips16
diff --git a/test/Driver/mips-float.c b/test/Driver/mips-float.c
index c9e107f..95eb002 100644
--- a/test/Driver/mips-float.c
+++ b/test/Driver/mips-float.c
@@ -1,3 +1,4 @@
+// REQUIRES: mips-registered-target
// Check handling -mhard-float / -msoft-float / -mfloat-abi options
// when build for MIPS platforms.
//