<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 15, 2014 at 11:15 AM, Frederic Riss <span dir="ltr"><<a href="mailto:friss@apple.com" target="_blank">friss@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">As it is explained in the commit log, this patch only moves from inheritance to composition, and the goal is to design a new interface better suited to DWARFUnitSection. This step is arguably what I should have posted first, the inheritance step wasn't really necessary. Now I could modify a lot more things in one go, but I usually get asked to split functional steps more not less :-)<br></blockquote><div><br></div><div>The changes Alexey suggested could possibly be done before this one (& before the inheritance was added too) - just as simple cleanup patches. Cleanup patches are nice & easy to review (& certainly just turning a loop into a range-based-for loop is the sort of thing that's commonly handled in post-commit review). By staging those cleanups ahead of this change, you wouldn't have to introduce and then remove a bunch of this API - it'd just never be needed.<br><br>This is what I do with some of the unique_ptr cleanup - by changing APIs taking non-owning T* to take T& initially as a simple cleanup, then when I change to unique_ptr the call sites like "func(*ptr)" remain untouched when ptr changes from raw to unique_ptr (without this I'd have had to change each call site from "func(ptr)" to "func(ptr.get())").<br><br>- David</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<a href="http://reviews.llvm.org/D5352" target="_blank">http://reviews.llvm.org/D5352</a><br>
<br>
<br>
</blockquote></div><br></div></div>