Error.h revision 327952
1//===- llvm/TableGen/Error.h - tblgen error handling helpers ----*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9// 10// This file contains error handling helper routines to pretty-print diagnostic 11// messages from tblgen. 12// 13//===----------------------------------------------------------------------===// 14 15#ifndef LLVM_TABLEGEN_ERROR_H 16#define LLVM_TABLEGEN_ERROR_H 17 18#include "llvm/Support/SourceMgr.h" 19 20namespace llvm { 21 22void PrintNote(ArrayRef<SMLoc> NoteLoc, const Twine &Msg); 23 24void PrintWarning(ArrayRef<SMLoc> WarningLoc, const Twine &Msg); 25void PrintWarning(const char *Loc, const Twine &Msg); 26void PrintWarning(const Twine &Msg); 27 28void PrintError(ArrayRef<SMLoc> ErrorLoc, const Twine &Msg); 29void PrintError(const char *Loc, const Twine &Msg); 30void PrintError(const Twine &Msg); 31 32LLVM_ATTRIBUTE_NORETURN void PrintFatalError(const Twine &Msg); 33LLVM_ATTRIBUTE_NORETURN void PrintFatalError(ArrayRef<SMLoc> ErrorLoc, 34 const Twine &Msg); 35 36extern SourceMgr SrcMgr; 37extern unsigned ErrorsPrinted; 38 39} // end namespace "llvm" 40 41#endif 42