[all-commits] [llvm/llvm-project] bea0b1: [mlir][ods] Assert on static getAttrName methods
Jeff Niu via All-commits
all-commits at lists.llvm.org
Wed Oct 12 17:56:30 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: bea0b1a896f55684eff0d5dbbbb73327448f698a
https://github.com/llvm/llvm-project/commit/bea0b1a896f55684eff0d5dbbbb73327448f698a
Author: Jeff Niu <jeff at modular.com>
Date: 2022-10-12 (Wed, 12 Oct 2022)
Changed paths:
M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
Log Message:
-----------
[mlir][ods] Assert on static getAttrName methods
This patch makes ODS insert an assert when calling static `get*AttrName`
methods with a `OperationName` that the name is the same as the op's.
This prevents accidentally passing the wrong kind of name and getting an
erroneous attribute name.
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D135698
More information about the All-commits
mailing list