[llvm-commits] [PATCH] Enhance TableGen with ranges and fixits

Jordan Rose jordan_rose at apple.com
Tue Dec 11 09:44:10 PST 2012


Hi, Jakob et al. I've been working on adding a warning to Clang-side TableGen, and realized everyone would hate it if it didn't have fixits. So I went in and added the necessary information to TableGen so that it can (a) track anonymous definitions, (b) save source ranges for DefInits (for the fixit), and (c) actually emit fixits.

The fixit work is fine, I think; it's added to SMDiagnostic, so actually any LLVM-level diagnostics could take advantage of it. My main worry is about the range-tracking info. TableGen currently doesn't do any memory management, but it does unique identical definitions. Once we're tracking source info, though, that uniquing isn't possible. Do we care, or is it okay because it's TableGen and it only runs once and then exits?

I'll post the Clang side of the patch on cfe-commits soon.

Thanks!
Jordan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-TableGen-record-anonymous-instantiations-of-classes.patch
Type: application/octet-stream
Size: 4819 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121211/5d1d79be/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-TableGen-save-source-ranges-for-DefInits.patch
Type: application/octet-stream
Size: 10386 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121211/5d1d79be/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Add-basic-fix-its-to-SMDiagnostic.patch
Type: application/octet-stream
Size: 13864 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121211/5d1d79be/attachment-0002.obj>


More information about the llvm-commits mailing list