[patch] Respect llvm.used in Internalize

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Jul 19 12:09:43 PDT 2013


The language reference says that:

"If a symbol appears in the @llvm.used list, then the compiler,
assembler, and linker are required to treat the symbol as if there is
a reference to the symbol that it cannot see"

Since even the linker cannot see the reference, we must assume that
the reference can be using the symbol table. For example, a debug
helper function like dump might be referenced from a debugger.

The attached patch makes internalize respect llvm.used.

Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.patch
Type: application/octet-stream
Size: 6453 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130719/325738ba/attachment.obj>


More information about the llvm-commits mailing list