[LLVMdev] Verifier & abort()
Reid Spencer
reid at x10sys.com
Fri Apr 2 00:11:05 PST 2004
P.S. Here's an example of verifier code that can emit multiple messages:
bool doFinalization(Module &M) {
// Scan through, checking all of the external function's linkage now...
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
visitGlobalValue(*I);
for (Module::giterator I = M.gbegin(), E = M.gend(); I != E; ++I)
visitGlobalValue(*I);
// If the module is broken, abort at this time.
abortIfBroken();
return false;
}
The function visitGlobalValue will check one value, print out a message
and set Broken=true. The abort doesn't happen until abortIfBroken() is
called.
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/23bd5e2f/attachment.sig>
More information about the llvm-dev
mailing list