mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
610302cfd2
Summary: With now a clear distinction between string and numeric substitutions, this patch introduces separate classes to represent them with a parent class implementing the common interface. Diagnostics in printSubstitutions() are also adapted to not require knowing which substitution is being looked at since it does not hinder clarity and makes the implementation simpler. Reviewers: jhenderson, jdenny, probinson, arichardson Subscribers: llvm-commits, probinson, arichardson, hiraditya Tags: #llvm Differential Revision: https://reviews.llvm.org/D62241 llvm-svn: 361446
23 lines
1.2 KiB
Plaintext
23 lines
1.2 KiB
Plaintext
; Test functionality of -D# option: numeric variables are defined to the right
|
|
; value and CHECK directives using them match as expected given the value set.
|
|
|
|
RUN: FileCheck -D#NUMVAL=12 --check-prefix CHECKNUM --input-file %s %s
|
|
RUN: not FileCheck -D#NUMVAL=8 --check-prefix CHECKNUM --input-file %s %s 2>&1 \
|
|
RUN: | FileCheck %s --strict-whitespace --check-prefix NUMERRMSG
|
|
RUN: not FileCheck -D#NUMVAL=12 --check-prefix NUMNOT --input-file %s %s 2>&1 \
|
|
RUN: | FileCheck %s --strict-whitespace --check-prefix NOT-NUMERRMSG
|
|
RUN: FileCheck -D#NUMVAL=8 --check-prefixes NUMNOT --input-file %s %s
|
|
|
|
Numeric value = 12
|
|
CHECKNUM: Numeric value = [[#NUMVAL]]
|
|
NUMNOT-NOT: Numeric value = [[#NUMVAL]]
|
|
|
|
NUMERRMSG: defines.txt:[[#@LINE-3]]:11: error: CHECKNUM: expected string not found in input
|
|
NUMERRMSG: defines.txt:1:1: note: scanning from here
|
|
NUMERRMSG: defines.txt:1:1: note: with "NUMVAL" equal to "8"
|
|
NUMERRMSG: defines.txt:[[#@LINE-7]]:1: note: possible intended match here
|
|
|
|
NOT-NUMERRMSG: defines.txt:[[#@LINE-7]]:13: error: {{NUMNOT}}-NOT: excluded string found in input
|
|
NOT-NUMERRMSG: defines.txt:[[#@LINE-10]]:1: note: found here
|
|
NOT-NUMERRMSG: defines.txt:[[#@LINE-11]]:1: note: with "NUMVAL" equal to "12"
|