[llvm-commits] [PATCH] Make TableGen Inits FoldingSetNodes

Jakob Stoklund Olesen stoklund at 2pi.dk
Mon Jul 11 14:30:26 PDT 2011


On Jul 11, 2011, at 2:25 PM, David A. Greene wrote:

> Jakob Stoklund Olesen <stoklund at 2pi.dk> writes:
> 
>>> I can't.  It's needed to maintain const-correctness.  LLVM won't build
>>> without it.
>> 
>> Sure you can.
> 
> How?  get() should return a const <foo>Init *.  As soon as you do that,
> it has to be const everywhere.
> 
> Otherwise there is a big risk of getting the patch wrong.  Having
> "const" there caught a lot of bugs as I developed this patch.

So you could have added the const-ness first and applied the actual changes later.

>> Let's discuss after you revert your patches.
> 
> I've committed the name change from Create() to get().  What else
> needs to be done?

Your patch still needs to be broken into two parts - one with the mechanical const changes, and one that we can actually review.

/jakob




More information about the llvm-commits mailing list