[llvm-commits] [PATCH]Gold plugin: don't report error on ELF file

Ivan Krasin krasin at chromium.org
Mon Sep 12 13:27:26 PDT 2011


Hi llvm team,

the patch is the follow up to r139340 (report errors occured in
lto_module_create_from_*
), see the code review at
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20110905/127615.html

That revision has turned on the diagnostics of failures inside LTO
(before that, such failures were silently ignored by gold plugin). It
appears that gold plugin did that for the reason: there's one
"intended" fail: when the passed file is not a bitcode file, LTO fails
to parse it and sets the error message appropriately. This does not
look right. Gold plugin ought just look for the magic and skip
non-bitcode files.

This patch adds such a check. Also, it handles the case when the gold
plugin is used not by gold, but by other tools like ar or nm, which
don't currently provide get_view method.

Please, take a look. Note: w/o this patch, r139340 has introduced
several issues (like excessive false warnings) and if this patch looks
completely wrong, it's probably better to revert r139340.

The patch is attached to the email and is also available online:
http://codereview.chromium.org/7844010/

krasin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gold_memoize.patch
Type: text/x-patch
Size: 2174 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110912/06d9c11f/attachment.bin>


More information about the llvm-commits mailing list