[llvm-commits] [llvm] r139340 - /llvm/trunk/tools/gold/gold-plugin.cpp
Ivan Krasin
krasin at google.com
Fri Sep 9 00:16:33 PDT 2011
Hi Duncan,
On Thu, Sep 8, 2011 at 11:14 PM, Duncan Sands <baldrick at free.fr> wrote:
> Hi Ivan,
>
>> - if (!M)
>> + if (!M) {
>> + if (const char* msg = lto_get_error_message()) {
>> + (*message)(LDPL_ERROR, "Failed to create LTO module: %s", msg);
>
> maybe this should mention LLVM? If you are doing GCC and LLVM LTO at the
> same time, just mentioning LTO is ambiguous. But perhaps the name of the
> plugin is printed, and that makes it clear?
the idea looks good to me.
Please, find the patch attached. It makes the diagnostics more precise
and adds a fast path for skipping non-bitcode files, if Gold version
supports get_view (i.e. gold is more-or-less recent). The latter is
important for two reasons:
- it's the common case for linking with the Gold plugin. It's good to
avoid creating heavy-weight Bitcode reader.
- after the change that has enabled these diagnostic messages, the
users have started to see warnings like "bfd plugin: Failed to create
LTO module: Invalid bitcode signature" which is definitely not
desirable.
OK to commit?
krasin
>
> Ciao, Duncan.
>
>> + return LDPS_ERR;
>> + }
>> return LDPS_OK;
>> + }
>>
>> *claimed = 1;
>> Modules.resize(Modules.size() + 1);
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gold_fast_precise.patch
Type: text/x-patch
Size: 895 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110909/b7ac1395/attachment.bin>
More information about the llvm-commits
mailing list