[PATCH][libLTO] Add Accessors to libLTO to expose more bitcode information

Rafael EspĂ­ndola rafael.espindola at gmail.com
Sun Apr 27 19:37:43 PDT 2014

On 27 April 2014 19:59, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote:
> +rafael
> On 2014 Apr 24, at 04:55, Nick Tomlinson <nick.tomlinson at arm.com> wrote:
>> Currently, libLTO does not provide access to the bitcode file's data layout,
>> or function attributes. The attached patch adds accessors to libLTO to
>> provide access to this information. Please could someone review it?
> I don't think this is a good idea.  The C API is stable, so this would
> lock down the list of attributes as well.  I think that makes this patch
> a no-go.
> Even exposing the data layout string seems dangerous, although maybe
> there's precedent here from `lto_module_get_target_triple()`?
> Rafael, am I missing something here?

No, you are probably right.

Nick, the libLTO api is limited to just what is needed during LTO. It
is also somewhat bound to what ld64 does, since that is what it was
designed for.

Are you adding LTO support to another linker? Can you use the c++ api
directly? For what it is worth, I intend to change tools/gold to do
exactly that at some point.


More information about the llvm-commits mailing list