[llvm-commits] gold plugin: report errors occured in lto_module_create_from_*

Ivan Krasin krasin at google.com
Thu Sep 8 16:22:00 PDT 2011


Hi Bill,

On Thu, Sep 8, 2011 at 3:32 PM, Bill Wendling <wendling at apple.com> wrote:
> Hi Krasin,
>
> This looks okay. But could you reverse the error and ok bits?
Your concern is valid (I ought to realize it myself!). Please, find
the proper patch attached.

krasin

>
>    const char* msg = lto_get_error_message();
>    if (msg) {
>      (*message)(LDPL_ERROR, "Failed to create LTO module: %s", msg);
>      return LDPS_ERR;
>    }
>    return LDPS_OK;
>
> Or more concise:
>
>    if (const char* msg = lto_get_error_message()) {
>      (*message)(LDPL_ERROR, "Failed to create LTO module: %s", msg);
>      return LDPS_ERR;
>    }
>    return LDPS_OK;
>
>
> -bw
>
> On Sep 8, 2011, at 1:49 PM, Ivan Krasin wrote:
>
>> Friendly ping
>>
>> On Thu, Sep 8, 2011 at 12:50 AM, Ivan Krasin <krasin at chromium.org> wrote:
>>> Hi llvm team!
>>>
>>> It appears that gold plugin does not check for errors occured in
>>> lto_module_create_from_*. It just silently returns with LDPS_OK
>>> status.
>>> This patch makes it to report occurred errors (if any).
>>>
>>> Is it fine to commit?
>>>
>>> krasin
>>>
>> _______________________________________________
>> 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_err_ok.patch
Type: text/x-patch
Size: 573 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110908/60218980/attachment.bin>


More information about the llvm-commits mailing list