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

Jakob Stoklund Olesen stoklund at 2pi.dk
Mon Jul 15 09:42:39 PDT 2013


On Jul 9, 2013, at 2:14 PM, Aaron Ballman <aaron at aaronballman.com> wrote:

> 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.

LGTM.

/jakob




More information about the llvm-commits mailing list