[PATCH] D16667: ELF: Do not use fatal in LinkerScript.cpp.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 28 10:52:33 PST 2016


Totally a casual comment & I could be totally off: Parser error recovery
can be really helpful to users (eg: Clang's error recovery), though (much
like using TLS for the general error handling improvements, and my comments
there) I expect this is a good first step and better error recovery can be
added over time to improve the user experience here.

As you've said, it's certainly not a terribly easy thing to do great error
recovery, and I wouldn't suggest trying to solve everything up-front, for
sure.

On Wed, Jan 27, 2016 at 6:44 PM, Rui Ueyama via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> ruiu created this revision.
> ruiu added a reviewer: rafael.
> ruiu added a subscriber: llvm-commits.
>
> Propagating errors back to callers is annoying in recursive descendent
> parser because they are naturally constructed as mutually recursive
> functions. In this patch, I took a simple approach. The accessors of
> the token stream behaves as if they are at EOF once we saw any errors.
> It naturally makes all functions to return.
>
> This is the final change to not use fatal in the linker.
>
> http://reviews.llvm.org/D16667
>
> Files:
>   ELF/LinkerScript.cpp
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160128/4fa55153/attachment.html>


More information about the llvm-commits mailing list