[cfe-commits] [llvm-commits] Reduce exception handling use in TableGen
Joerg Sonnenberger
joerg at britannica.bec.de
Tue Oct 23 09:07:17 PDT 2012
On Mon, Oct 22, 2012 at 10:26:48AM -0700, Jakob Stoklund Olesen wrote:
>
> On Oct 22, 2012, at 1:08 AM, Joerg Sonnenberger <joerg at britannica.bec.de> wrote:
>
> > Hi all,
> > the attached patch removes the majority of the exception handling
> > dependency in TableGen. There is a small regression in the quality of
> > error messages in one code path of the SetTheory implementation, where
> > the location of the original expression is lost. This is a bit difficult
> > to fix since the functions involved can be accessed directly as well and
> > I am not sure how much value the location adds here.
>
> There is an error in your patch, but I'm not going to tell you where. Good luck ;-)
Maybe I am still too sleepy from the conference, but I don't see any :(
> The location-less errors are really annoying, please try to find a way
> of preserving the location info. It also looks like many of the throws
> you converted (outside SetTheory) could easily pass a relevant location
> to PrintFatalError.
Sure, can work on providing that, but it changes the interface.
> Is it possible to get rid of the TGError exception class as well?
I think so. Without throwing exceptions around, it is just a fancy way
to store message and location.
Joerg
More information about the cfe-commits
mailing list