1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00
Go to file
Joel E. Denny fcd363afd3 [FileCheck] Fix -dump-input per-pattern diagnostic indexing
In input dump annotations, `check:2'1` indicates diagnostic 1 for the
`CHECK` directive on check file line 2.  Without this patch,
`-dump-input` computes the diagnostic index with the assumption that
FileCheck *consecutively* produces all diagnostics for the same
pattern.  Already, that can be a false assumption, as in the examples
below.  Moreover, it seems like a brittle assumption as FileCheck
evolves.  Finally, it actually complicates the implementation even if
it makes it slightly more efficient.

This patch avoids that assumption.  Examples below show results after
applying this patch.  Before applying this patch, `'N` is omitted
throughout these examples because the implementation doesn't notice
there's more than one diagnostic per pattern.

First, `CHECK-LABEL` violates the assumption because `CHECK-LABEL`
tries to match twice, and other directives can match in between:

```
$ cat check
CHECK: foobar
CHECK-LABEL: foobar

$ FileCheck -vv check < input |& tail -8
<<<<<<
           1: text
           2: foobar
label:2'0     ^~~~~~
check:1       ^~~~~~
label:2'1           X error: no match found
           3: text
>>>>>>
```

Second, `--implicit-check-not` is obviously processed many times among
other directives:

```
$ cat check
CHECK: foo
CHECK: foo

$ FileCheck -vv -dump-input=always -implicit-check-not=foo \
            check < input |& tail -16
<<<<<<
            1: text
not:imp1'0     X~~~~
            2: foo
check:1        ^~~
not:imp1'1        X
            3: text
not:imp1'1     ~~~~~
            4: foo
check:2        ^~~
not:imp1'2        X
            5: text
not:imp1'2     ~~~~~
            6:
eof:2          ^
>>>>>>
```

Reviewed By: thopre, jhenderson

Differential Revision: https://reviews.llvm.org/D97813
2021-03-27 10:36:21 -04:00
benchmarks
bindings [NFC][OCaml] Resolve a couple more compilation warnings 2021-03-26 20:56:19 +00:00
cmake [CMake][gRPC] Fix a typo in protobuf version variable name 2021-03-26 19:33:06 +03:00
docs docs: Adding Google representative to the security group 2021-03-26 18:55:37 -07:00
examples [Orc][examples] Factor out make_error from parseExampleModule (NFC) 2021-03-26 18:49:07 +01:00
include Make FoldBranchToCommonDest poison-safe by default 2021-03-27 19:05:12 +09:00
lib [BasicAA] Correct handle implicit sext in decomposition 2021-03-27 15:15:47 +01:00
projects llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
resources
runtimes [runtimes] Add the libc project to the list of runtimes. 2021-03-23 17:33:03 +00:00
test [FileCheck] Fix -dump-input per-pattern diagnostic indexing 2021-03-27 10:36:21 -04:00
tools [NFC] Reordering parameters in getFile and getFileOrSTDIN 2021-03-25 09:47:49 -04:00
unittests [Triple][Driver] Add muslx32 environment and use /lib/ld-musl-x32.so.1 for -dynamic-linker 2021-03-25 16:25:47 -07:00
utils [FileCheck] Fix -dump-input per-pattern diagnostic indexing 2021-03-27 10:36:21 -04:00
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt [CMAKE] Fix cross-compilation build 2021-03-23 13:24:08 +03:00
CODE_OWNERS.TXT [M68k][CODE_OWNERS](0/8) Add code owner for the M68k target 2021-03-08 12:30:56 -08:00
configure
CREDITS.TXT [NFC] Add contributors names to CREDITS.TXT 2020-10-07 13:22:55 -04:00
LICENSE.TXT
llvm.spec.in
README.txt
RELEASE_TESTERS.TXT

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.