<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Added Lang to the To: line and he maybe better to comment.<div class=""><br class=""></div><div class="">While the change looks cleaner I’m not sure what the error handling should be for malformed Mach-O files in llvm’s libObject.  If malformed Mach-O files cause asserts it is difficult to build tools to print and diagnose bad files.  For example in Mac OS otool(1) is used both to display information about good Mach-O files and do its best to display what it can with warning about  malformed Mach-O files.  For the guy producing Mach-O files which some times are broken this is a valuable approach for have otool(1) be able so show what it can instead of just stopping.</div><div class=""><br class=""></div><div class="">My thoughts,</div><div class="">Kev<div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 23, 2015, at 1:49 PM, Rafael Espíndola <<a href="mailto:rafael.espindola@gmail.com" class="">rafael.espindola@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">ping.<div class=""><br class=""></div><div class="">Felipe's work has improved things in here, but the attached patch still passes all tests.</div><div class=""><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On 10 December 2014 at 14:35, Rafael Espíndola <span dir="ltr" class=""><<a href="mailto:rafael.espindola@gmail.com" target="_blank" class="">rafael.espindola@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 18 November 2014 at 21:04, Rafael Espíndola<br class="">
<div class=""><div class="h5"><<a href="mailto:rafael.espindola@gmail.com" class="">rafael.espindola@gmail.com</a>> wrote:<br class="">
>> -      assert(!DataInCodeLoadCmd && "Multiple data in code tables");<br class="">
>> +      // Multiple data in code tables<br class="">
>> +      if (DataInCodeLoadCmd) {<br class="">
>> +        EC = object_error::parse_failed;<br class="">
>> +        return;<br class="">
>> +      }<br class="">
><br class="">
> Do you have a testcase for this? As with COFF, an assert/unreachable<br class="">
> is better unless we have a test showing how this is actually reached.<br class="">
<br class="">
</div></div>Ping.<br class="">
<br class="">
I can revert this patch (revert attached) and check-all still passes.<br class="">
<br class="">
Cheers,<br class="">
Rafael<br class="">
</blockquote></div><br class=""></div>
<span id="cid:9FB248B6-3855-4E96-B874-3DD21F21DC76@apple.com"><t.patch></span>_______________________________________________<br class="">llvm-commits mailing list<br class=""><a href="mailto:llvm-commits@cs.uiuc.edu" class="">llvm-commits@cs.uiuc.edu</a><br class="">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits<br class=""></div></blockquote></div><br class=""></div></div></body></html>