[llvm] r311631 - [Support] Rewrite handleAllErrors in terms of cantFail.

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 28 13:26:41 PST 2018

Sorry for just noticing it, but:

> +/// Behaves the same as handleErrors, except that it requires that all
> +/// errors be handled by the given handlers. If any unhandled error remains
> +/// after the handlers have run, report_fatal_error() will be called.

It actually calls llvm_unreachable. If it is considered a usage bug for
this code to see an Error we should update the documentation, if not,
the code.

> +template <typename... HandlerTs>
> +void handleAllErrors(Error E, HandlerTs &&... Handlers) {
> +  cantFail(handleErrors(std::move(E), std::forward<HandlerTs>(Handlers)...));
> +}


More information about the llvm-commits mailing list