[PATCH] D11787: Port the error functions from ELF to COFF.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Wed Aug 5 17:07:42 PDT 2015


On 5 August 2015 at 19:31, Rui Ueyama <ruiu at google.com> wrote:
> ruiu added a comment.
>
> Handling errors with "eist immediately when error" policy seems good to me, but it makes error codes defined in error.h useless since we no longer return errors as return values. Maybe we should remove them.

The patch deletes Error.h...

> ================
> Comment at: COFF/Driver.h:30-34
> @@ -29,1 +29,7 @@
>
> +LLVM_ATTRIBUTE_NORETURN void error(Twine Msg);
> +void error(std::error_code EC, Twine Prefix);
> +template <typename T> void error(const ErrorOr<T> &V, Twine Prefix) {
> +  error(V.getError(), Prefix);
> +}
> +
> ----------------
> error() does not particularly belong to Driver, so piggy-backing it with Driver doesn't seem a good idea to me. I'd move it to Error.h.

True. I will add Error.h back and put the error functions there.

Cheers,
Rafael


More information about the llvm-commits mailing list