[all-commits] [llvm/llvm-project] 7a9e3e: [mlir] Fix crash in RewriterGen when a `TypeConstr...
zero9178 via All-commits
all-commits at lists.llvm.org
Thu Feb 3 00:08:45 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7a9e3ef77a3c4dc1cffb8ae768db6207fdab1877
https://github.com/llvm/llvm-project/commit/7a9e3ef77a3c4dc1cffb8ae768db6207fdab1877
Author: Markus Böck <markus.boeck02 at gmail.com>
Date: 2022-02-03 (Thu, 03 Feb 2022)
Changed paths:
M mlir/test/mlir-tblgen/rewriter-errors.td
M mlir/tools/mlir-tblgen/RewriterGen.cpp
Log Message:
-----------
[mlir] Fix crash in RewriterGen when a `TypeConstraint` is not given an argument
The code assumes that a TypeConstraint in the additional constraints list specifies precisely one argument.
If the user were to not specify any, it'd result in a crash. If given more than one, the additional ones were ignored.
This patch fixes the crash and disallows user errors by adding a check that a single argument is supplied to the TypeConstraint
Differential Revision: https://reviews.llvm.org/D118763
More information about the All-commits
mailing list