[patch] Allow aliases to be unnamed_addr

Reid Kleckner rnk at google.com
Thu Jun 5 17:01:21 PDT 2014


lgtm


On Thu, Jun 5, 2014 at 4:25 PM, Rafael EspĂ­ndola <rafael.espindola at gmail.com
> wrote:

> Currently unnamed_addr is in a strange state. It is stored in
> GlobalValue, the language reference talks about "unnamed_addr aliases"
> but the verifier rejects them.
>
> We should move it to GlobalObject or make it legal in aliases.
>
> Given the recent changes, It seems natural to allow them in aliases:
>
> * It is a property of how it is accessed, not of the data itself.
> * It is perfectly possible to write code that depends on the address
> of an alias.
>
> The attached patch then makes unname_addr legal for aliases. One side
> effect is that the syntax changes for a corner case: In globals,
> unnamed_addr is now printed before the address space.
>
> Cheers,
> Rafael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140605/fd8f05c2/attachment.html>


More information about the llvm-commits mailing list