<p dir="ltr">The linker doesn't use error codes. All errors are fatal, and I think that's not going to change. The expected use case of error codes is to use this linker to link in-memory object files by passing command line options and memory buffer references. I don't know about exact use cases yet.</p>
<p dir="ltr">I'll merge these categories together to make it simple. We can extend that later of we have to in future.</p>
<div class="gmail_quote">2015/05/31 午後4:23 "Rafael Espíndola" <<a href="mailto:rafael.espindola@gmail.com">rafael.espindola@gmail.com</a>>:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 31 May 2015 at 19:05, Rui Ueyama <<a href="mailto:ruiu@google.com">ruiu@google.com</a>> wrote:<br>
> ================<br>
> Comment at: COFF/Error.h:21<br>
> @@ +20,3 @@<br>
> +// Driver errors<br>
> +enum class DriverError { Success, InvalidOption };<br>
> +<br>
> ----------------<br>
> rafael wrote:<br>
>> I don't think you need Success. You can just use std::error_code(), no?<br>
> Correct. I'll remove that.<br>
><br>
> Does it make sense to merge all the error categories into one LLDErrorCategory and let the caller distinguish error type by its value? What do you think?<br>
<br>
I guess it depends on the common usage.<br>
<br>
The most common case I have seen so far is<br>
<br>
-----------------------------------------<br>
if (EC == SomeParticularErrorToIgnore)<br>
  return/continue;<br>
<br>
Report all other errors in an uniform way.<br>
---------------------------<br>
<br>
If that is the case, yes, it is probably better to have coarse categories.<br>
<br>
Thanks,<br>
Rafael<br>
</blockquote></div>