<div dir="ltr">The more correct design would probably be to have some kind of hierarchy like:<div><br></div><div>Constant : Value</div><div>GlobalValue : Constant # has linkage, vis, etc</div><div>GlobalAlias : GlobalValue</div>
<div>RealGlobalValue : GlobalValue # has section and alignment</div><div>Function : RealGlobalValue</div><div>GlobalVariable : RealGlobalValue</div><div><br></div><div>It's not clear to me that it's worth it, but we should probably get more input.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Feb 13, 2014 at 10:15 AM, Reid Kleckner <span dir="ltr"><<a href="mailto:rnk@google.com" target="_blank">rnk@google.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">lgtm</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Feb 13, 2014 at 8:39 AM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@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><div>On 13 February 2014 00:30, Rafael Espíndola <<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>> wrote:<br>
> On 12 February 2014 22:23, Reid Kleckner <<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>> wrote:<br>
>> lgtm, assuming this passes an optimized build of something interesting.<br>
>><br>
>> Should we go further and assert(!isa<GlobalAlias>(this) || S.empty()); in<br>
>> GlobalValue::setSection?<br>
><br>
> Good point. I can't imagine why some pass would want to set this even<br>
> temporarily. We cannot use isa on the header because GlobalAlias is<br>
> incomplete there. What do you think of the attached patch? I will try<br>
> a clang bootstrap with it tomorrow.<br>
<br>
</div></div>This passed the bootstrap.<br>
<br>
Cheers,<br>
Rafael<br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>