[PATCH] D25697: Make the LTO comdat api more symbol table friendly

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 17 14:13:22 PDT 2016


On 17 October 2016 at 17:09, Mehdi AMINI <mehdi.amini at apple.com> wrote:
> mehdi_amini added a comment.
>
> While the symbols in the "on disk" representation would have an int pointing to a table, it is not clear to me why you couldn't return directly a StringRef from the symbol?

Convenience of use. Having an index into the symbol table makes it
really simple to check if a symbol is in a kept comdat or not.

The corresponding case in ELF is that a Comdat is represented as a
vector of section indexes, so this is basically a simplification to
the IR case where we don't need the sections.

Cheers,
Rafael


More information about the llvm-commits mailing list