Skip to content

Commit

Permalink
[lit] Remove lit's REQUIRES-ANY directive
Browse files Browse the repository at this point in the history
Summary:
Remove REQUIRES-ANY alias lit directive since it is hardly used and can
be easily implemented using an OR expression using REQUIRES. Fixup
remaining testcases still using REQUIRES-ANY.

Reviewers: probinson, jdenny, gparker42

Reviewed By: gparker42

Subscribers: eugenis, asb, rbar, johnrusso, simoncook, sabuasal, niosHD, delcypher, jrtc27, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, lenary, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, cfe-commits, #sanitizers, llvm-commits

Tags: #llvm, #clang, #sanitizers

Differential Revision: https://reviews.llvm.org/D71408
  • Loading branch information
Thomas Preud'homme committed Dec 17, 2019
1 parent d9ca412 commit ddd0bb8
Show file tree
Hide file tree
Showing 18 changed files with 18 additions and 39 deletions.
2 changes: 1 addition & 1 deletion clang/test/Driver/XRay/xray-instrument-macos.c
@@ -1,4 +1,4 @@
// RUN: %clang -o /dev/null -v -fxray-instrument -target x86_64-apple-macos10.11 -c %s
// RUN: %clang -o /dev/null -v -fxray-instrument -target x86_64-apple-darwin15 -c %s
// REQUIRES-ANY: x86_64, x86_64h
// REQUIRES: x86_64 || x86_64h
typedef int a;
2 changes: 1 addition & 1 deletion clang/test/Driver/XRay/xray-instrument-os.c
@@ -1,4 +1,4 @@
// RUN: not %clang -o /dev/null -v -fxray-instrument -c %s
// XFAIL: -linux-, -freebsd, -darwin, -macos
// REQUIRES-ANY: amd64, x86_64, x86_64h, arm, aarch64, arm64
// REQUIRES: amd64 || x86_64 || x86_64h || arm || aarch64 || arm64
typedef int a;
4 changes: 2 additions & 2 deletions clang/test/Driver/XRay/xray-instrumentation-bundles-flags.cpp
Expand Up @@ -7,5 +7,5 @@
// RUN: | FileCheck %s
// CHECK: -fxray-instrumentation-bundle=function
//
// REQUIRES-ANY: linux, freebsd
// REQUIRES-ANY: amd64, x86_64, x86_64h, arm, aarch64, arm64
// REQUIRES: linux || freebsd
// REQUIRES: amd64 || x86_64 || x86_64h || arm || aarch64 || arm64
4 changes: 2 additions & 2 deletions clang/test/Driver/XRay/xray-mode-flags.cpp
Expand Up @@ -45,5 +45,5 @@
// FDR: libclang_rt.xray-fdr
// NONE-NOT: libclang_rt.xray-basic
// NONE-NOT: libclang_rt.xray-fdr
// REQUIRES-ANY: linux, freebsd
// REQUIRES-ANY: amd64, x86_64, x86_64h, arm, aarch64, arm64
// REQUIRES: linux || freebsd
// REQUIRES: amd64 || x86_64 || x86_64h || arm || aarch64 || arm64
4 changes: 2 additions & 2 deletions clang/test/Driver/XRay/xray-nolinkdeps.cpp
Expand Up @@ -4,5 +4,5 @@
// RUN: 2>&1 | FileCheck --check-prefix ENABLE %s
// ENABLE: clang_rt.xray
// DISABLE-NOT: clang_rt.xray
// REQUIRES-ANY: linux, freebsd
// REQUIRES-ANY: amd64, x86_64, x86_64h, arm, aarch64, arm64
// REQUIRES: linux || freebsd
// REQUIRES: amd64 || x86_64 || x86_64h || arm || aarch64 || arm64
2 changes: 1 addition & 1 deletion compiler-rt/test/builtins/Unit/arm/aeabi_cdcmpeq_test.c
@@ -1,4 +1,4 @@
// REQUIRES-ANY: arm-target-arch,armv6m-target-arch
// REQUIRES: arm-target-arch || armv6m-target-arch
// RUN: %arm_call_apsr -o %t.aspr.o
// RUN: %clang_builtins %s %t.aspr.o %librt -o %t && %run %t
//===-- aeabi_cdcmpeq.c - Test __aeabi_cdcmpeq ----------------------------===//
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/test/builtins/Unit/arm/aeabi_cdcmple_test.c
@@ -1,4 +1,4 @@
// REQUIRES-ANY: arm-target-arch,armv6m-target-arch
// REQUIRES: arm-target-arch || armv6m-target-arch
// RUN: %arm_call_apsr -o %t.aspr.o
// RUN: %clang_builtins %s %t.aspr.o %librt -o %t && %run %t

Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/test/builtins/Unit/arm/aeabi_cfcmpeq_test.c
@@ -1,4 +1,4 @@
// REQUIRES-ANY: arm-target-arch,armv6m-target-arch
// REQUIRES: arm-target-arch || armv6m-target-arch
// RUN: %arm_call_apsr -o %t.aspr.o
// RUN: %clang_builtins %s %t.aspr.o %librt -o %t && %run %t
//===-- aeabi_cfcmpeq.c - Test __aeabi_cfcmpeq ----------------------------===//
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/test/builtins/Unit/arm/aeabi_cfcmple_test.c
@@ -1,4 +1,4 @@
// REQUIRES-ANY: arm-target-arch,armv6m-target-arch
// REQUIRES: arm-target-arch || armv6m-target-arch
// RUN: %arm_call_apsr -o %t.aspr.o
// RUN: %clang_builtins %s %t.aspr.o %librt -o %t && %run %t

Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/test/builtins/Unit/arm/aeabi_drsub_test.c
@@ -1,4 +1,4 @@
// REQUIRES-ANY: arm-target-arch,armv6m-target-arch
// REQUIRES: arm-target-arch || armv6m-target-arch
// RUN: %clang_builtins %s %librt -o %t && %run %t
//===-- aeabi_drsub.c - Test __aeabi_drsub --------------------------------===//
//
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/test/builtins/Unit/arm/aeabi_frsub_test.c
@@ -1,4 +1,4 @@
// REQUIRES-ANY: arm-target-arch,armv6m-target-arch
// REQUIRES: arm-target-arch || armv6m-target-arch
// RUN: %clang_builtins %s %librt -o %t && %run %t
//===-- aeabi_frsub.c - Test __aeabi_frsub --------------------------------===//
//
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/test/builtins/Unit/arm/aeabi_idivmod_test.c
@@ -1,4 +1,4 @@
// REQUIRES-ANY: arm-target-arch,armv6m-target-arch
// REQUIRES: arm-target-arch || armv6m-target-arch
// RUN: %clang_builtins %s %librt -o %t && %run %t
//===-- aeabi_idivmod_test.c - Test __aeabi_idivmod -----------------------===//
//
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/test/builtins/Unit/arm/aeabi_uidivmod_test.c
@@ -1,4 +1,4 @@
// REQUIRES-ANY: arm-target-arch,armv6m-target-arch
// REQUIRES: arm-target-arch || armv6m-target-arch
// RUN: %clang_builtins %s %librt -o %t && %run %t
//===-- aeabi_uidivmod_test.c - Test __aeabi_uidivmod ---------------------===//
//
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/test/builtins/Unit/arm/aeabi_uldivmod_test.c
@@ -1,4 +1,4 @@
// REQUIRES-ANY: arm-target-arch,armv6m-target-arch
// REQUIRES: arm-target-arch || armv6m-target-arch
// RUN: %clang_builtins %s %librt -o %t && %run %t
//===-- aeabi_uldivmod_test.c - Test aeabi_uldivmod -----------------------===//
//
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/test/builtins/Unit/riscv/mulsi3_test.c
@@ -1,4 +1,4 @@
// REQUIRES-ANY: riscv32-target-arch
// REQUIRES: riscv32-target-arch
// RUN: %clang_builtins %s %librt -o %t && %run %t
//===-- mulsi3_test.c - Test __mulsi3 -------------------------------------===//
//
Expand Down
17 changes: 0 additions & 17 deletions llvm/utils/lit/lit/TestRunner.py
Expand Up @@ -1304,20 +1304,6 @@ def _handleBooleanExpr(line_number, line, output):
BooleanExpression.evaluate(s, [])
return output

@staticmethod
def _handleRequiresAny(line_number, line, output):
"""A custom parser to transform REQUIRES-ANY: into REQUIRES:"""

# Extract the conditions specified in REQUIRES-ANY: as written.
conditions = []
IntegratedTestKeywordParser._handleList(line_number, line, conditions)

# Output a `REQUIRES: a || b || c` expression in its place.
expression = ' || '.join(conditions)
IntegratedTestKeywordParser._handleBooleanExpr(line_number,
expression, output)
return output

def parseIntegratedTestScript(test, additional_parsers=[],
require_script=True):
"""parseIntegratedTestScript - Scan an LLVM/Clang style integrated test
Expand All @@ -1341,9 +1327,6 @@ def parseIntegratedTestScript(test, additional_parsers=[],
initial_value=test.xfails),
IntegratedTestKeywordParser('REQUIRES:', ParserKind.BOOLEAN_EXPR,
initial_value=test.requires),
IntegratedTestKeywordParser('REQUIRES-ANY:', ParserKind.CUSTOM,
IntegratedTestKeywordParser._handleRequiresAny,
initial_value=test.requires),
IntegratedTestKeywordParser('UNSUPPORTED:', ParserKind.BOOLEAN_EXPR,
initial_value=test.unsupported),
IntegratedTestKeywordParser('END.', ParserKind.TAG)
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit ddd0bb8

Please sign in to comment.