[PATCH] Teach tablegen to elide case-less switch statements

Aaron Ballman aaron at aaronballman.com
Tue Jul 9 14:14:07 PDT 2013


The following patch teaches llvm-tblgen to not emit a switch statement
when there are no case statements .  This should slightly clean up the
output from tablegen in those cases (and there are a handful).

Most of the changes in the patch are indentation levels after wrapping
code in an if block.  However, I did switch to using a stringstream in
AsmMatcherEmitter.cpp because of the complexity involved in checking
whether cases were produced or not.

~Aaron
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm-tablegen.patch
Type: application/octet-stream
Size: 8053 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130709/ee6d3e41/attachment.obj>


More information about the llvm-commits mailing list