[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
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 25776 bytes
Desc: not available
More information about the llvm-commits