1 //===- llvm/TableGen/Error.h - tblgen error handling helpers ----*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains error handling helper routines to pretty-print diagnostic
11 // messages from tblgen.
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_TABLEGEN_ERROR_H
16 #define LLVM_TABLEGEN_ERROR_H
18 #include "llvm/Support/SourceMgr.h"
22 void PrintWarning(ArrayRef<SMLoc> WarningLoc, const Twine &Msg);
23 void PrintWarning(const char *Loc, const Twine &Msg);
24 void PrintWarning(const Twine &Msg);
26 void PrintError(ArrayRef<SMLoc> ErrorLoc, const Twine &Msg);
27 void PrintError(const char *Loc, const Twine &Msg);
28 void PrintError(const Twine &Msg);
30 LLVM_ATTRIBUTE_NORETURN void PrintFatalError(const Twine &Msg);
31 LLVM_ATTRIBUTE_NORETURN void PrintFatalError(ArrayRef<SMLoc> ErrorLoc,
34 extern SourceMgr SrcMgr;
35 extern unsigned ErrorsPrinted;
38 } // end namespace "llvm"