aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineDebugify.cpp
diff options
context:
space:
mode:
authorStephen Neuendorffer <stephen.neuendorffer@xilinx.com>2020-04-04 22:54:35 -0700
committerStephen Neuendorffer <stephen.neuendorffer@xilinx.com>2020-04-07 15:06:51 -0700
commit19fec004e23adbc43b839ddf1be8bc2e22e58aca (patch)
tree5164dba87dd72e1db4726d62fe60b69c7fbf00bd /llvm/lib/CodeGen/MachineDebugify.cpp
parent75f60c698fdfc0ea46f84b7f92d667d6e7f53f7f (diff)
downloadllvm-19fec004e23adbc43b839ddf1be8bc2e22e58aca.zip
llvm-19fec004e23adbc43b839ddf1be8bc2e22e58aca.tar.gz
llvm-19fec004e23adbc43b839ddf1be8bc2e22e58aca.tar.bz2
[MLIR] Add note for file-line numbers in tablegen errors for assembly formats
Error messages for the custom assembly format are difficult to understand because there are no line numbers. This happens because the assembly format is parsed as a standalone line, separate from it's parent file, with no useful location information. Fixing this properly probably requires quite a bit of invasive plumbing through the SourceMgr, similar to how included files are handled This proposal is a less invasive short term solution. When generating an error message we generate an additional note which at least properly describes the operation definition the error occured in, if not the actual line number of the assemblyFormat definition. A typical message is like: error: type of operand #0, named 'operand', is not buildable and a buildable type cannot be inferred $operand type($result) attr-dict ^ /src/llvm-project/mlir/test/mlir-tblgen/op-format-spec.td:296:1: note: in custom assembly format for this operation def ZCoverageInvalidC : TestFormat_Op<"variable_invalid_c", [{ ^ note: suggest adding a type constraint to the operation or adding a 'type($operand)' directive to the custom assembly format $operand type($result) attr-dict ^ Differential Revision: https://reviews.llvm.org/D77488
Diffstat (limited to 'llvm/lib/CodeGen/MachineDebugify.cpp')
0 files changed, 0 insertions, 0 deletions