[cfe-commits] [llvm-commits] Reduce exception handling use in TableGen

Jakob Stoklund Olesen stoklund at 2pi.dk
Mon Oct 22 10:26:48 PDT 2012


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 ;-)

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.

Is it possible to get rid of the TGError exception class as well?

/jakob




More information about the cfe-commits mailing list