[PATCH] D58077: [tablegen] Add locations to many PrintFatalError() calls
Daniel Sanders via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 11 14:34:15 PST 2019
dsanders created this revision.
dsanders added reviewers: bogner, aditya_nandakumar, volkan, aemerson, paquette.
Herald added subscribers: jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, niosHD, sabuasal, apazos, simoncook, johnrusso, rbar, asb.
Herald added a project: LLVM.
While working on the GISel Combiner, I noticed I was producing location-less
error messages fairly often and set about fixing this. In the process, I
noticed quite a few places elsewhere in TableGen that also neglected to include
a relevant location.
This patch adds locations to errors that relate to a specific record (or a
field within it) and also have easy access to the relevant location. This is
particularly useful when multiclasses are involved as many of these errors
refer to the full name of a record and it's difficult to guess which substring
is grep-able.
Unfortunately, tablegen currently only supports Record granularity so it's not
currently possible to point at a specific Init so these sometimes point at the
record that caused the error rather than the precise origin of the error.
Repository:
rL LLVM
https://reviews.llvm.org/D58077
Files:
utils/TableGen/AsmMatcherEmitter.cpp
utils/TableGen/AsmWriterInst.cpp
utils/TableGen/CallingConvEmitter.cpp
utils/TableGen/CodeGenDAGPatterns.cpp
utils/TableGen/CodeGenInstruction.cpp
utils/TableGen/CodeGenRegisters.cpp
utils/TableGen/CodeGenSchedule.cpp
utils/TableGen/CodeGenTarget.cpp
utils/TableGen/InstrInfoEmitter.cpp
utils/TableGen/IntrinsicEmitter.cpp
utils/TableGen/RISCVCompressInstEmitter.cpp
utils/TableGen/SDNodeProperties.cpp
utils/TableGen/SearchableTableEmitter.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58077.186340.patch
Type: text/x-patch
Size: 25776 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190211/332c12af/attachment.bin>
More information about the llvm-commits
mailing list