[PATCH] D34814: [ELF] - Fail the link if something happens on DWARF parsing stage of -gdb-index building

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 11 08:54:19 PDT 2017


George Rimar <grimar at accesssoftek.com> writes:

> No, we have fatal(...) which is noreturn, error(...) is just a regular reporting helper,
> that continues execution and increases ErrorCount counter.
> So this code intention is to report all errors from parser and LLD will fail the link later.
>
> At the same time error reporting subsystem has error limit. I was wondering when wrote this patch
> if I should do something like:
>
> if (ErrorCount  >= Config->ErrorLimit)
>   return ErrorPolicy::Halt;
> error(toString(Sec->File) + ": error parsing DWARF data:\n>>> " +
>     toString(std::move(E)));
> return ErrorPolicy::Continue;

That seems more than needed. I assume the intention of Halt is to stop
the dwarf parsing, but let the client continue.

Cheers,
Rafael


More information about the llvm-commits mailing list