<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Oct 24, 2013 at 4:45 PM, Eric Christopher <span dir="ltr"><<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div class="h5"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Oct 24, 2013 at 4:30 PM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
<div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><span style="font-family:arial,sans-serif;font-size:13px">There are cases where we have a SP definition with a null declaration field.</span></div>



<span><font color="#888888">
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div></font></span></div></blockquote><div><br></div></div><div>Are you sure? Do you have an example?</div></div></div></div></blockquote></div><div>

<br>
Non-member functions, such as this simple CU:<br><br>  void func() {<br>  }<br><br>produces DWARF with a subprogram list of one element, a DW_TAG_subprogram of 'func' with a null declaration field.</div></div></div>


</div>
</blockquote></div><br></div></div></div><div class="gmail_extra">Right, but it'll be added to the context of the CU below anyhow. Sorry, I was thinking "An example where the context isn't already the CU".</div>
<div class="gmail_extra">
<br></div><div class="gmail_extra">That said, if the namespace and gnu-public-names tests pass after Manman's coming patches that rework this then it should be fine.</div><span class="HOEnZb"><font color="#888888"><div class="gmail_extra">
<br></div></font></span></div></blockquote><div><br></div><div>To elaborate a bit more, this could definitely use refactoring, however, the current code is actually correct in that if we don't have a declaration we'll fall through to the next set of code and immediate insert into the context anyhow and I can't come up with a possible TU where we don't have a declaration and yet have a definition that has a context other than the compile unit.</div>
<div><br></div><div>That said, it's awkward and less than ideal. Conveniently for me Manman has patches in flight that rework this area of code. :)</div><div><br></div><div>-eric </div></div></div></div>