[PATCH] D150880: [RFC, FileCheck] Allow AP value for numeric expressions
Thomas Preud'homme via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 27 05:19:47 PDT 2023
thopre added a comment.
In D150880#4448939 <https://reviews.llvm.org/D150880#4448939>, @arichardson wrote:
> Overall LGTM but as this is a rather large diff I may have missed something.
I'll try your suggestion to see if we can have 2 smaller diffs instead. Do you have any opinion on the question in the second paragraph of the description?
================
Comment at: llvm/lib/FileCheck/FileCheckImpl.h:121
-/// Class representing a numeric value.
-class ExpressionValue {
-private:
----------------
arichardson wrote:
> To reduce the size of the diff we could have this class wrap a single apint but since you've made the changes to remove it already I think we may as well remove it.
That's a good idea, I'll explore this to see if I can create 2 patches instead of 1. I don't mind a bit more work if it makes for an easier review.
================
Comment at: llvm/lib/FileCheck/FileCheckImpl.h:155
/// AST or an error if evaluation fails.
- virtual Expected<ExpressionValue> eval() const = 0;
+ virtual Expected<APInt> eval() const = 0;
----------------
arichardson wrote:
> Hmm maybe we should add `using ExpressionValue = APInt` to avoid all these changes.
They have different interface but I could use APInt inside ExpressionValue instead of int64_t as suggested above.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150880/new/
https://reviews.llvm.org/D150880
More information about the llvm-commits
mailing list