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

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue Oct 1 12:25:40 PDT 2013


llvm-nm might be a smaller hammer :-)

It would be even nicer to have an option to produce IL out of
llvm-lto, but the patch is OK with llvm-nm.

On 1 October 2013 15:15, Tom Roeder <tmroeder at google.com> wrote:
> 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
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>



More information about the llvm-commits mailing list