[PATCH] Adding an -exported-symbol flag to llvm-lto

Tom Roeder tmroeder at google.com
Tue Oct 1 12:15:24 PDT 2013


The attached patch adds a flag -exported-symbol to llvm-lto; symbols
passed to this flag are added to the list of symbols preserved by the
LTO pass. This makes llvm-lto more useful for testing LTO directly,
since it makes it easier to write simple code that doesn't get
completely eliminated by the optimizations.

I've added a test case to the existing LTO test, using llvm-objdump to
disassemble the object file generated by llvm-lto and checking to make
sure the symbol was or wasn't eliminated.

Please let me know what you think.

Thanks,

Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exported_symbol.patch
Type: application/octet-stream
Size: 1849 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131001/59c56011/attachment.obj>


More information about the llvm-commits mailing list