[LLVMdev] Verifier & abort()

Reid Spencer reid at x10sys.com
Fri Apr 2 00:04:02 PST 2004


On Thu, 2004-04-01 at 19:23, Chris Lattner wrote:
> The verifier should provide two APIs:
> 
> 1. The Verifier pass should do what it currently does: check the program
>    and abort on failure.
> 2. There should be a VerifyModule function which checks the program and
>    throws an exception on error with an error message.  I would assume
>    that this is the one you would want to use.
> 
> I don't think that the verifier can actually emit multiple error messages.
> After it finds one problem, it can't really depend on the state of the
> module, so it bails out immediately.  Throwing the exception would give
> the same semantics and allow the caller code to decide how to handle it...

The verifier can emit multiple messages of the same kind. For example,
when it processes the list of functions, it processes them all and then
aborts if it finds errors in that list.  I've seen the output so this
isn't creative thinking.

So, I'm going to make verifyModule do as you mentioned. The messages
will be gathered in a stringstream and thrown.

Reid.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20040402/f94a0aef/attachment.sig>


More information about the llvm-dev mailing list