[lit] Support %if ... %else syntax for RUN linesThis syntax allows to modify RUN lines based on featuresavailable. For example: RUN: ... | FileCheck %s --check-prefix=%if windows %{CHECK-W%}
[lit] Support %if ... %else syntax for RUN linesThis syntax allows to modify RUN lines based on featuresavailable. For example: RUN: ... | FileCheck %s --check-prefix=%if windows %{CHECK-W%} %else %{CHECK-NON-W%} CHECK-W: ... CHECK-NON-W: ...The whole command can be put under %if ... %else: RUN: %if tool_available %{ %tool %} %else %{ true %}or: RUN: %if tool_available %{ %tool %}If tool_available feature is missing, we'll have an empty command inthis RUN line. LIT used to emit an error for empty commands, but nowit treats such commands as nop in all cases.Multi-line expressions are also supported: RUN: %if tool_available %{ \ RUN: %tool \ RUN: %} %else %{ \ RUN: true \ RUN: %}Background and motivation:D121727 [NVPTX] Integrate ptxas to LIT testshttps://reviews.llvm.org/D121727Differential Revision: https://reviews.llvm.org/D122569
show more ...