[patch] Allow aliases to be unnamed_addr

Rafael EspĂ­ndola rafael.espindola at gmail.com
Thu Jun 5 16:25:10 PDT 2014


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 --------------
A non-text attachment was scrubbed...
Name: llvm.patch
Type: text/x-patch
Size: 21763 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140605/0d971d3e/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang.patch
Type: text/x-patch
Size: 1044 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140605/0d971d3e/attachment-0001.bin>


More information about the llvm-commits mailing list