Error.h revision 276479
11590Srgrimes//===- llvm/TableGen/Error.h - tblgen error handling helpers ----*- C++ -*-===//
21590Srgrimes//
31590Srgrimes//                     The LLVM Compiler Infrastructure
41590Srgrimes//
51590Srgrimes// This file is distributed under the University of Illinois Open Source
61590Srgrimes// License. See LICENSE.TXT for details.
71590Srgrimes//
81590Srgrimes//===----------------------------------------------------------------------===//
91590Srgrimes//
101590Srgrimes// This file contains error handling helper routines to pretty-print diagnostic
111590Srgrimes// messages from tblgen.
121590Srgrimes//
131590Srgrimes//===----------------------------------------------------------------------===//
141590Srgrimes
151590Srgrimes#ifndef LLVM_TABLEGEN_ERROR_H
161590Srgrimes#define LLVM_TABLEGEN_ERROR_H
171590Srgrimes
181590Srgrimes#include "llvm/Support/SourceMgr.h"
191590Srgrimes
201590Srgrimesnamespace llvm {
211590Srgrimes
221590Srgrimesvoid PrintWarning(ArrayRef<SMLoc> WarningLoc, const Twine &Msg);
231590Srgrimesvoid PrintWarning(const char *Loc, const Twine &Msg);
241590Srgrimesvoid PrintWarning(const Twine &Msg);
251590Srgrimes
261590Srgrimesvoid PrintError(ArrayRef<SMLoc> ErrorLoc, const Twine &Msg);
271590Srgrimesvoid PrintError(const char *Loc, const Twine &Msg);
281590Srgrimesvoid PrintError(const Twine &Msg);
291590Srgrimes
301590SrgrimesLLVM_ATTRIBUTE_NORETURN void PrintFatalError(const Twine &Msg);
3154162ScharnierLLVM_ATTRIBUTE_NORETURN void PrintFatalError(ArrayRef<SMLoc> ErrorLoc,
3254162Scharnier                                             const Twine &Msg);
3354162Scharnier
341590Srgrimesextern SourceMgr SrcMgr;
35112212Srobertextern unsigned ErrorsPrinted;
3699112Sobrien
3799112Sobrien} // end namespace "llvm"
381590Srgrimes
391590Srgrimes#endif
40112212Srobert