[patch] Verify that a GlobalAlias has no section or alignment.
Reid Kleckner
rnk at google.com
Thu Feb 13 10:25:18 PST 2014
The more correct design would probably be to have some kind of hierarchy
like:
Constant : Value
GlobalValue : Constant # has linkage, vis, etc
GlobalAlias : GlobalValue
RealGlobalValue : GlobalValue # has section and alignment
Function : RealGlobalValue
GlobalVariable : RealGlobalValue
It's not clear to me that it's worth it, but we should probably get more
input.
On Thu, Feb 13, 2014 at 10:15 AM, Reid Kleckner <rnk at google.com> wrote:
> lgtm
>
>
> On Thu, Feb 13, 2014 at 8:39 AM, Rafael EspĂndola <
> rafael.espindola at gmail.com> wrote:
>
>> On 13 February 2014 00:30, Rafael EspĂndola <rafael.espindola at gmail.com>
>> wrote:
>> > On 12 February 2014 22:23, Reid Kleckner <rnk at google.com> wrote:
>> >> lgtm, assuming this passes an optimized build of something interesting.
>> >>
>> >> Should we go further and assert(!isa<GlobalAlias>(this) || S.empty());
>> in
>> >> GlobalValue::setSection?
>> >
>> > Good point. I can't imagine why some pass would want to set this even
>> > temporarily. We cannot use isa on the header because GlobalAlias is
>> > incomplete there. What do you think of the attached patch? I will try
>> > a clang bootstrap with it tomorrow.
>>
>> This passed the bootstrap.
>>
>> Cheers,
>> Rafael
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140213/e6d789c6/attachment.html>
More information about the llvm-commits
mailing list