Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init |
|
#
5c9d82de |
| 14-Dec-2023 |
Kazu Hirata <kazu@google.com> |
[llvm] Use StringRef::{starts,ends}_with (NFC)
This patch replaces uses of StringRef::{starts,ends}with with StringRef::{starts,ends}_with for consistency with std::{string,string_view}::{starts,end
[llvm] Use StringRef::{starts,ends}_with (NFC)
This patch replaces uses of StringRef::{starts,ends}with with StringRef::{starts,ends}_with for consistency with std::{string,string_view}::{starts,ends}_with in C++20.
I'm planning to deprecate and eventually remove StringRef::{starts,ends}with.
show more ...
|
Revision tags: llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2 |
|
#
40dc8e68 |
| 27-Sep-2023 |
Gregory Alfonso <gfunni234@gmail.com> |
[NFC] Use const references to avoid copying objects in for-loops
Differential Revision: https://reviews.llvm.org/D139487
|
Revision tags: llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2 |
|
#
5bd8f481 |
| 08-Aug-2023 |
Simon Pilgrim <llvm-dev@redking.me.uk> |
[FileCheck] Fix MSVC 'argument': truncation from 'int' to 'bool' warning.
Ensure expectOperationValueResult performs the is_integral_v as constexpr to prevent MSVC getting confused between the mixtu
[FileCheck] Fix MSVC 'argument': truncation from 'int' to 'bool' warning.
Ensure expectOperationValueResult performs the is_integral_v as constexpr to prevent MSVC getting confused between the mixture of integer / string constructors in the if-else.
Warning introduced in D150880
show more ...
|
Revision tags: llvmorg-17.0.0-rc1, llvmorg-18-init |
|
#
b743c193 |
| 30-Jun-2023 |
Thomas Preud'homme <thomas.preudhomme@arm.com> |
[FileCheck] Turn errors into assert in valueFromStringRepr()
getWildcardRegex() guarantees that only valid hex numbers are matched by FileCheck numeric expressions. This commit therefore only assert
[FileCheck] Turn errors into assert in valueFromStringRepr()
getWildcardRegex() guarantees that only valid hex numbers are matched by FileCheck numeric expressions. This commit therefore only asserts the lack of parsing failure in valueFromStringRepr().
Depends On D154430
Reviewed By: arichardson
Differential Revision: https://reviews.llvm.org/D154431
show more ...
|
#
e15e969a |
| 03-Jul-2023 |
Thomas Preud'homme <thomas.preudhomme@arm.com> |
[FileCheck, 4/4] NFC: Stop using ExpressionValue
Use APInt directly instead.
Depends On D150880
Reviewed By: arichardson
Differential Revision: https://reviews.llvm.org/D154430
|
#
0726cb00 |
| 07-Aug-2023 |
Thomas Preud'homme <thomas.preudhomme@arm.com> |
[FileCheck, 3/4] Allow AP value for numeric expressions
Use APInt to represent numeric variables and expressions, therefore removing overflow concerns. Only remains underflow when the format of an e
[FileCheck, 3/4] Allow AP value for numeric expressions
Use APInt to represent numeric variables and expressions, therefore removing overflow concerns. Only remains underflow when the format of an expression is unsigned (incl. hex values) but the result is negative. Note that this can only happen when substituting an expression, not when capturing since the regex used to capture unsigned value will not include minus sign, hence all the code removal for match propagation testing. This is what this patch implement.
Reviewed By: arichardson
Differential Revision: https://reviews.llvm.org/D150880
show more ...
|
#
fc0d1c05 |
| 29-Jun-2023 |
Thomas Preud'homme <thomas.preudhomme@arm.com> |
[FileCheck, 2/4] NFC: Switch to APInt getter for ExpressionValue
Use an APInt getter as the only interface to getting the value out of an ExpressionValue. This paves the way to switch ExpressionValu
[FileCheck, 2/4] NFC: Switch to APInt getter for ExpressionValue
Use an APInt getter as the only interface to getting the value out of an ExpressionValue. This paves the way to switch ExpressionValue to handle any integer without causing too big of a patch.
Reviewed By: arichardson
Differential Revision: https://reviews.llvm.org/D154429
show more ...
|
Revision tags: llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4 |
|
#
13eb298d |
| 16-May-2023 |
Thomas Preud'homme <thomas.preudhomme@arm.com> |
Turn unreachable error into assert
Function valueFromStringRepr() throws an error on missing 0x prefix when parsing a number string into a value. However, getWildcardRegex() already ensures that onl
Turn unreachable error into assert
Function valueFromStringRepr() throws an error on missing 0x prefix when parsing a number string into a value. However, getWildcardRegex() already ensures that only text with the 0x prefix will match and be parsed, making that error throwing code dead code. This commit turn the code into an assert and remove the unit tests exercising that test accordingly.
Reviewed By: jhenderson
Differential Revision: https://reviews.llvm.org/D150797
show more ...
|
Revision tags: llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7 |
|
#
2fa744e6 |
| 16-Dec-2022 |
Fangrui Song <i@maskray.me> |
std::optional::value => operator*/operator->
value() has undesired exception checking semantics and calls __throw_bad_optional_access in libc++. Moreover, the API is unavailable without _LIBCPP_NO_E
std::optional::value => operator*/operator->
value() has undesired exception checking semantics and calls __throw_bad_optional_access in libc++. Moreover, the API is unavailable without _LIBCPP_NO_EXCEPTIONS on older Mach-O platforms (see _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS).
This commit fixes LLVMAnalysis and its dependencies.
show more ...
|
#
94081642 |
| 14-Dec-2022 |
Fangrui Song <i@maskray.me> |
[FileCheck] llvm::Optional => std::optional
Don't touch FileCheck.cpp:698 StringSwitch<Optional<binop_eval_t>>(FuncName). MSVC and older GCC may report errors:
error C2664: 'llvm::StringSwitch<std:
[FileCheck] llvm::Optional => std::optional
Don't touch FileCheck.cpp:698 StringSwitch<Optional<binop_eval_t>>(FuncName). MSVC and older GCC may report errors:
error C2664: 'llvm::StringSwitch<std::optional<llvm::binop_eval_t>,T> &llvm::StringSwitch<T,T>::Case(llvm::StringLiteral,T)': cannot convert argument 2 from 'overloaded-function' to 'T' with [ T=std::optional<llvm::binop_eval_t> ]
llvm/lib/FileCheck/FileCheck.cpp:699:44: error: no matching function for call to ‘llvm::StringSwitch<std::optional<llvm::Expected<llvm::ExpressionValue> (*)(const llvm::ExpressionValue&, const llvm::ExpressionValue&)> >::Case(const char [4], <unresolved overloaded function type>)’ .Case("add", operator+) ^
show more ...
|
#
547e40a9 |
| 14-Dec-2022 |
Douglas Yung <douglas.yung@sony.com> |
Revert "[FileCheck] llvm::Optional => std::optional"
This reverts commit 13fd37c931c26ec07613dcad67b5ab2a593cd416.
This change is causing bot failures on some Windows and older GCC bots: - https://
Revert "[FileCheck] llvm::Optional => std::optional"
This reverts commit 13fd37c931c26ec07613dcad67b5ab2a593cd416.
This change is causing bot failures on some Windows and older GCC bots: - https://lab.llvm.org/buildbot/#/builders/123/builds/14678 - https://lab.llvm.org/buildbot/#/builders/216/builds/14436 - https://lab.llvm.org/staging/#/builders/235/builds/993
show more ...
|
#
13fd37c9 |
| 14-Dec-2022 |
Fangrui Song <i@maskray.me> |
[FileCheck] llvm::Optional => std::optional
|
Revision tags: llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init |
|
#
611ffcf4 |
| 14-Jul-2022 |
Kazu Hirata <kazu@google.com> |
[llvm] Use value instead of getValue (NFC)
|
#
3b7c3a65 |
| 25-Jun-2022 |
Kazu Hirata <kazu@google.com> |
Revert "Don't use Optional::hasValue (NFC)"
This reverts commit aa8feeefd3ac6c78ee8f67bf033976fc7d68bc6d.
|
#
aa8feeef |
| 25-Jun-2022 |
Kazu Hirata <kazu@google.com> |
Don't use Optional::hasValue (NFC)
|
Revision tags: llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1 |
|
#
d4d80a29 |
| 14-May-2021 |
Benjamin Kramer <benny.kra@googlemail.com> |
Bump googletest to 1.10.0
|
Revision tags: llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1, llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3 |
|
#
fd941036 |
| 28-Aug-2020 |
Thomas Preud'homme <thomasp@graphcore.ai> |
Fix PR46880: Fail CHECK-NOT with undefined variable
Currently a CHECK-NOT directive succeeds whenever the corresponding match fails. However match can fail due to an error rather than a lack of matc
Fix PR46880: Fail CHECK-NOT with undefined variable
Currently a CHECK-NOT directive succeeds whenever the corresponding match fails. However match can fail due to an error rather than a lack of match, for instance if a variable is undefined. This commit makes match error a failure for CHECK-NOT.
Reviewed By: jdenny
Differential Revision: https://reviews.llvm.org/D86222
show more ...
|
#
5ca168b0 |
| 10-Mar-2021 |
Thomas Preud'homme <thomasp@graphcore.ai> |
[FileCheck, test] Rename checkWildcardRegexCharMatchFailure
Proposed edit https://reviews.llvm.org/D97845#inline-922769 in D97845 suggests the checkWildcardRegexCharMatchFailure function name is mis
[FileCheck, test] Rename checkWildcardRegexCharMatchFailure
Proposed edit https://reviews.llvm.org/D97845#inline-922769 in D97845 suggests the checkWildcardRegexCharMatchFailure function name is misleading because it is not clear it checks for a match failure on each character in the string parameter. This commit renames it to an hopefully clearer name.
Reviewed By: jdenny
Differential Revision: https://reviews.llvm.org/D98343
show more ...
|
#
058455ff |
| 16-Mar-2021 |
Thomas Preud'homme <thomasp@graphcore.ai> |
[FileCheck] Fix PR49531: invalid use of string var
FileCheck string substitution block parsing code only report an invalid variable name in a string variable use if it starts with a forbidden charac
[FileCheck] Fix PR49531: invalid use of string var
FileCheck string substitution block parsing code only report an invalid variable name in a string variable use if it starts with a forbidden character. It does not report anything if there are unparsed characters after the variable name, i.e. [[X-Y]] is parsed as [[X]] and no error is returned. This commit fixes that.
Reviewed By: jdenny, jhenderson
Differential Revision: https://reviews.llvm.org/D98691
show more ...
|
#
dd59c132 |
| 17-Mar-2021 |
Joel E. Denny <jdenny.ornl@gmail.com> |
[FileCheck] Fix numeric error propagation
A more general name might be match-time error propagation. That is, it's conceivable we'll one day have non-numeric errors that require the handling fixed
[FileCheck] Fix numeric error propagation
A more general name might be match-time error propagation. That is, it's conceivable we'll one day have non-numeric errors that require the handling fixed by this patch.
Without this patch, FileCheck behaves as follows:
``` $ cat check CHECK-NOT: [[#0x8000000000000000+0x8000000000000000]]
$ FileCheck -vv -dump-input=never check < input check:1:54: remark: implicit EOF: expected string found in input CHECK-NOT: [[#0x8000000000000000+0x8000000000000000]] ^ <stdin>:2:1: note: found here
^ check:1:15: error: unable to substitute variable or numeric expression: overflow error CHECK-NOT: [[#0x8000000000000000+0x8000000000000000]] ^ $ echo $? 0 ```
Notice that the exit status is 0 even though there's an error. Moreover, FileCheck doesn't print the error diagnostic unless both `-dump-input=never` and `-vv` are specified.
The same problem occurs when `CHECK-NOT` does have a match but a capture fails due to overflow: exit status is 0, and no diagnostic is printed unless both `-dump-input=never` and `-vv` are specified. The usefulness of capturing from `CHECK-NOT` is questionable, but this case should certainly produce an error.
With this patch, FileCheck always includes the error diagnostic and has non-zero exit status for the above examples. It's conceivable that this change will cause some existing tests to fail, but my assumption is that they should fail. Moreover, with nearly every project enabled, this patch didn't produce additional `check-all` failures for me.
This patch also extends input dumps to include such numeric error diagnostics for both expected and excluded patterns.
As noted in fixmes in some of the tests added by this patch, this patch worsens an existing issue with redundant diagnostics. I'll fix that bug in a subsequent patch.
Reviewed By: thopre, jhenderson
Differential Revision: https://reviews.llvm.org/D98086
show more ...
|
Revision tags: llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2 |
|
#
f9e2a62c |
| 11-Jun-2020 |
Thomas Preud'homme <thomasp@graphcore.ai> |
[FileCheck] Add support for hex alternate form in FileCheck
Add printf-style alternate form flag to prefix hex number with 0x when present. This works on both empty numeric expression (e.g. variable
[FileCheck] Add support for hex alternate form in FileCheck
Add printf-style alternate form flag to prefix hex number with 0x when present. This works on both empty numeric expression (e.g. variable definition from input) and when matching a numeric expression. The syntax is as follows:
[[#%#<precision specifier><format specifier>, ...]
where <precision specifier> and <format specifier> are optional and ... can be a variable definition or not with an empty expression or not.
This feature was requested in https://reviews.llvm.org/D81144#2075532 for llvm/test/MC/ELF/gen-dwarf64.s
Reviewed By: jdenny
Differential Revision: https://reviews.llvm.org/D97845
show more ...
|
#
5ffd940a |
| 01-Sep-2020 |
Raphael Isemann <teemperor@gmail.com> |
Reland [FileCheck] Move FileCheck implementation out of LLVMSupport into its own library
This relands e9a3d1a401b07cbf7b11695637f1b549782a26cd which was originally missing linking LLVMSupport into L
Reland [FileCheck] Move FileCheck implementation out of LLVMSupport into its own library
This relands e9a3d1a401b07cbf7b11695637f1b549782a26cd which was originally missing linking LLVMSupport into LLMVFileCheck which broke the SHARED_LIBS build.
Original summary:
The actual FileCheck logic seems to be implemented in LLVMSupport. I don't see a good reason for having FileCheck implemented there as it has a very specific use while LLVMSupport is a dependency of pretty much every LLVM tool there is. In fact, the only use of FileCheck I could find (outside the FileCheck tool and the FileCheck unit test) is a single call in GISelMITest.h.
This moves the FileCheck logic to its own LLVMFileCheck library. This way only FileCheck and the GlobalISelTests now have a dependency on this code.
Reviewed By: jhenderson
Differential Revision: https://reviews.llvm.org/D86344
show more ...
|
#
e9a3d1a4 |
| 31-Aug-2020 |
Raphael Isemann <teemperor@gmail.com> |
[FileCheck] Move FileCheck implementation out of LLVMSupport into its own library
The actual FileCheck logic seems to be implemented in LLVMSupport. I don't see a good reason for having FileCheck im
[FileCheck] Move FileCheck implementation out of LLVMSupport into its own library
The actual FileCheck logic seems to be implemented in LLVMSupport. I don't see a good reason for having FileCheck implemented there as it has a very specific use while LLVMSupport is a dependency of pretty much every LLVM tool there is. In fact, the only use of FileCheck I could find (outside the FileCheck tool and the FileCheck unit test) is a single call in GISelMITest.h.
This moves the FileCheck logic to its own LLVMFileCheck library. This way only FileCheck and the GlobalISelTests now have a dependency on this code.
Reviewed By: jhenderson
Differential Revision: https://reviews.llvm.org/D86344
show more ...
|