On Wednesday 19 August 2009 16:43, Eli Friedman wrote:> > We're dealing with this, but it's not a particularly friendly way to > > operate. Most compilers have some kind of error reporting mechanism > > and it would be helpful if LLVM provided a way to turn asserts and > > aborts into hooks that could be plugged into an existing infrastructure. > > > > Signal handlers aren't the best solution. Like I said, we're dealing > > with it but it's something we should be aware of long-term. > > C++ isn't a safe language; there is in fact such a thing as an > unrecoverable error, and there isn't really anything we can do about > it.It's not about recovery, it's about message reporting. Right now the LLVM abort messages are formatted completely differently than aborts from other parts of our compiler. That's not friendly to users. -Dave
On Aug 19, 2009, at 2:57 PM, David Greene wrote:> On Wednesday 19 August 2009 16:43, Eli Friedman wrote: > >>> We're dealing with this, but it's not a particularly friendly way to >>> operate. Most compilers have some kind of error reporting mechanism >>> and it would be helpful if LLVM provided a way to turn asserts and >>> aborts into hooks that could be plugged into an existing >>> infrastructure. >>> >>> Signal handlers aren't the best solution. Like I said, we're >>> dealing >>> with it but it's something we should be aware of long-term. >> >> C++ isn't a safe language; there is in fact such a thing as an >> unrecoverable error, and there isn't really anything we can do about >> it. > > It's not about recovery, it's about message reporting. Right now > the LLVM > abort messages are formatted completely differently than aborts from > other > parts of our compiler. That's not friendly to users.This is what ErrorReporting.h is all about. -Chris
On Wednesday 19 August 2009 18:01, Chris Lattner wrote:> > It's not about recovery, it's about message reporting. Right now > > the LLVM > > abort messages are formatted completely differently than aborts from > > other > > parts of our compiler. That's not friendly to users. > > This is what ErrorReporting.h is all about.But asserts and aborts don't go through that, right? What's needed is a way to get those assert and abort messages out to other compiler components so they have a chance to report them nicely to the user. Again, it's not a critical issue right now, just one I've thought about from time to time. -Dave