[patch] Allow aliases to be unnamed_addr

Duncan P. N. Exon Smith dexonsmith at apple.com
Sat Jun 7 12:44:52 PDT 2014


On 2014 Jun 5, at 16:25, 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.

The changes LGTM, but I think you missed a couple of references
to the old order in LangRef.  In particular, I noticed the syntax
descriptions for "Global Variables" and "Aliases".

There might be other references too?



More information about the llvm-commits mailing list