[llvm-exegesis] [NFC] Fixing typo.
[llvm-complete.git] / utils / llvm-build / llvmbuild / util.py
blobca021c4d574ed9e3c4b2ddaa12d506d574c1099f
1 import os
2 import sys
4 def _write_message(kind, message):
5 program = os.path.basename(sys.argv[0])
6 sys.stderr.write('%s: %s: %s\n' % (program, kind, message))
8 note = lambda message: _write_message('note', message)
9 warning = lambda message: _write_message('warning', message)
10 error = lambda message: _write_message('error', message)
11 fatal = lambda message: (_write_message('fatal error', message), sys.exit(1))
13 __all__ = ['note', 'warning', 'error', 'fatal']