<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Thu, Nov 10, 2016 at 6:01 PM Greg Clayton <<a href="mailto:clayborg@gmail.com">clayborg@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It can be NULL so it needs to stay a pointer. An upcoming change will call DWARFFormValue::getFixedByteSize() for each form in an abbreviation with a NULL DWARFUnit and expect to get None back for anything that can change size due to version, addrsize or DWARF32/DWARF64.<br class="gmail_msg"></blockquote><div><br></div><div>Rightio - usually we add functionality when it's needed/live, so we can properly assess the test coverage, etc. But as you see fit.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br class="gmail_msg">
> On Nov 10, 2016, at 4:27 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com" class="gmail_msg" target="_blank">dblaikie@gmail.com</a>> wrote:<br class="gmail_msg">
><br class="gmail_msg">
> Sure - still feels a bit like overengineering, but anyway.<br class="gmail_msg">
><br class="gmail_msg">
> The parameter should be const ref, rather than pointer (it can't be null, so prefer a reference) & the template parameter type could perhaps have a more meaningful name like 'FormSizes' or somesuch.<br class="gmail_msg">
><br class="gmail_msg">
> On Thu, Nov 10, 2016 at 4:06 PM Greg Clayton <<a href="mailto:clayborg@gmail.com" class="gmail_msg" target="_blank">clayborg@gmail.com</a>> wrote:<br class="gmail_msg">
> David,<br class="gmail_msg">
><br class="gmail_msg">
> Take a look at the latest changes I posted. I think this will solve the issues we were both worried about.<br class="gmail_msg">
><br class="gmail_msg">
> <a href="https://reviews.llvm.org/D26526" rel="noreferrer" class="gmail_msg" target="_blank">https://reviews.llvm.org/D26526</a><br class="gmail_msg">
><br class="gmail_msg">
> Let me know what you think.<br class="gmail_msg">
><br class="gmail_msg">
> Greg<br class="gmail_msg">
><br class="gmail_msg">
><br class="gmail_msg">
><br class="gmail_msg">
> > On Nov 10, 2016, at 3:39 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com" class="gmail_msg" target="_blank">dblaikie@gmail.com</a>> wrote:<br class="gmail_msg">
> ><br class="gmail_msg">
> ><br class="gmail_msg">
> ><br class="gmail_msg">
> > On Thu, Nov 10, 2016 at 3:34 PM Greg Clayton <<a href="mailto:clayborg@gmail.com" class="gmail_msg" target="_blank">clayborg@gmail.com</a>> wrote:<br class="gmail_msg">
> > clayborg added a comment.<br class="gmail_msg">
> ><br class="gmail_msg">
> > In order to skip a form to access the 10th attribute, we need to skip 9 forms. Each one of those will individually extract 3 piece of data for which 2 surely never be used and 1 might be used 10% of the time. So it seems it would be worth being lazy if we can especially since it is so easy to do.<br class="gmail_msg">
> ><br class="gmail_msg">
> > Still just seems a bit premature to me - you'll still have to initialize the vptr every time through there, for example, and when you do access it it'll be dynamic calls and all that.<br class="gmail_msg">
> ><br class="gmail_msg">
> > In order of preference:<br class="gmail_msg">
> ><br class="gmail_msg">
> > 1) just punt on the whole thing & gather the three values up-front<br class="gmail_msg">
> > 2) make it a template (if performance is this important here - let's avoid the virtual calls, even if it's on relatively few forms)<br class="gmail_msg">
> > 3) as-is, except with the dtor non-virtual (protected in the base class, derived classes final)<br class="gmail_msg">
> ><br class="gmail_msg">
> > I'll leave it to you & Adrian, though - just my 2c.<br class="gmail_msg">
> ><br class="gmail_msg">
> > - Dave<br class="gmail_msg">
><br class="gmail_msg">
<br class="gmail_msg">
</blockquote></div></div>