aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h
diff options
context:
space:
mode:
authorRiver Riddle <riddleriver@gmail.com>2022-02-01 15:01:30 -0800
committerRiver Riddle <riddleriver@gmail.com>2022-02-02 13:34:28 -0800
commit42e5f1d97b3ecf6f967a0e63ca39f05d3262e2b2 (patch)
treefe0eba59b88a8d3de65336bfa0b93803068c7d20 /lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h
parent7e9d19016eae3b169dea1148978d339f4d2433e2 (diff)
downloadllvm-42e5f1d97b3ecf6f967a0e63ca39f05d3262e2b2.zip
llvm-42e5f1d97b3ecf6f967a0e63ca39f05d3262e2b2.tar.gz
llvm-42e5f1d97b3ecf6f967a0e63ca39f05d3262e2b2.tar.bz2
[mlir] Refactor how additional verification is specified in ODS
Currently if an operation requires additional verification, it specifies an inline code block (`let verifier = "blah"`). This is quite problematic for various reasons, e.g. it requires defining C++ inside of Tablegen which is discouraged when possible, but mainly because nearly all usages simply forward to a static function `static LogicalResult verify(SomeOp op)`. This commit adds support for a `hasVerifier` bit field that specifies if an additional verifier is needed, and when set to `1` declares a `LogicalResult verify()` method for operations to override. For migration purposes, the existing behavior is untouched. Upstream usages will be replaced in a followup to keep this patch focused on the hasVerifier implementation. One main user facing change is that what was one `MyOp::verify` is now `MyOp::verifyInvariants`. This better matches the name this method is called everywhere else, and also frees up `verify` for the user defined additional verification. The `verify` function when generated now (for additional verification) is private to the operation class, which should also help avoid accidental usages after this switch. Differential Revision: https://reviews.llvm.org/D118742
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h')
0 files changed, 0 insertions, 0 deletions