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

Rafael Ávila de Espíndola via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 17 14:06:40 PDT 2016


rafael created this revision.
rafael added reviewers: mehdi_amini, pcc, davide.
rafael added a subscriber: llvm-commits.

In an IR symbol table I would expect the comdats to be represented as:

- A table of strings, one for each comdat name.
- Each symbol has an optional index into that table.

The natural api for accessing that would be

InputFile:
ArrayRef<StringRef> getComdats() const;

Symbol:
int getComdat() const;

This patch implements an API as close to that as possible.  The implementation on top of the current IRObjectFile is a bit hackish, but should map just fine over a symbol table and is very convenient to use (I will upload the lld patch).


https://reviews.llvm.org/D25697

Files:
  include/llvm/LTO/LTO.h
  lib/LTO/LTO.cpp
  tools/gold/gold-plugin.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25697.74900.patch
Type: text/x-patch
Size: 4908 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161017/63fa0b38/attachment.bin>


More information about the llvm-commits mailing list