[llvm-commits] [llvm] r134907 - /llvm/trunk/utils/TableGen/

David Blaikie dblaikie at gmail.com
Tue Jul 12 18:46:36 PDT 2011


>
> Constifying Init requires that I get rid of non-const methods.  These
> are methods like BitsInit::setBit() that modify already-existing
> objects.  Once those are gone, various pieces of code that create Inits
> by cloning an existing Init and modifying it need to be updated to avoid
> the modification.


This could still be split up further, simply by reversing the changes:

Update existing code that mutates objects so it they don't mutate.
Remove mutation functions.
Add const.

(these last two can be done in parallel (but still as separate changes/CRs,
so they're small & easy to consume), since they don't overlap, really)

This kind of approach also makes diff history easier to read - each change
does exactly one thing & is easy to reason about & work with, should a
regression occur in that particular revision.

- David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110712/eead0ec0/attachment.html>


More information about the llvm-commits mailing list