LLVM API Documentation

TableGen/Error.h
Go to the documentation of this file.
00001 //===- llvm/TableGen/Error.h - tblgen error handling helpers ----*- C++ -*-===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // This file contains error handling helper routines to pretty-print diagnostic
00011 // messages from tblgen.
00012 //
00013 //===----------------------------------------------------------------------===//
00014 
00015 #ifndef LLVM_TABLEGEN_ERROR_H
00016 #define LLVM_TABLEGEN_ERROR_H
00017 
00018 #include "llvm/Support/SourceMgr.h"
00019 
00020 namespace llvm {
00021 
00022 void PrintWarning(ArrayRef<SMLoc> WarningLoc, const Twine &Msg);
00023 void PrintWarning(const char *Loc, const Twine &Msg);
00024 void PrintWarning(const Twine &Msg);
00025 
00026 void PrintError(ArrayRef<SMLoc> ErrorLoc, const Twine &Msg);
00027 void PrintError(const char *Loc, const Twine &Msg);
00028 void PrintError(const Twine &Msg);
00029 
00030 LLVM_ATTRIBUTE_NORETURN void PrintFatalError(const Twine &Msg);
00031 LLVM_ATTRIBUTE_NORETURN void PrintFatalError(ArrayRef<SMLoc> ErrorLoc,
00032                                              const Twine &Msg);
00033 
00034 extern SourceMgr SrcMgr;
00035 extern unsigned ErrorsPrinted;
00036 
00037 } // end namespace "llvm"
00038 
00039 #endif