LLVM  10.0.0svn
Error.h
Go to the documentation of this file.
1 //===- llvm/TableGen/Error.h - tblgen error handling helpers ----*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains error handling helper routines to pretty-print diagnostic
10 // messages from tblgen.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_TABLEGEN_ERROR_H
15 #define LLVM_TABLEGEN_ERROR_H
16 
17 #include "llvm/Support/SourceMgr.h"
18 
19 namespace llvm {
20 
21 void PrintNote(const Twine &Msg);
22 void PrintNote(ArrayRef<SMLoc> NoteLoc, const Twine &Msg);
23 
24 void PrintWarning(ArrayRef<SMLoc> WarningLoc, const Twine &Msg);
25 void PrintWarning(const char *Loc, const Twine &Msg);
26 void PrintWarning(const Twine &Msg);
27 
28 void PrintError(ArrayRef<SMLoc> ErrorLoc, const Twine &Msg);
29 void PrintError(const char *Loc, const Twine &Msg);
30 void PrintError(const Twine &Msg);
31 
32 LLVM_ATTRIBUTE_NORETURN void PrintFatalError(const Twine &Msg);
33 LLVM_ATTRIBUTE_NORETURN void PrintFatalError(ArrayRef<SMLoc> ErrorLoc,
34  const Twine &Msg);
35 
36 extern SourceMgr SrcMgr;
37 extern unsigned ErrorsPrinted;
38 
39 } // end namespace "llvm"
40 
41 #endif
This class represents lattice values for constants.
Definition: AllocatorList.h:23
SourceMgr SrcMgr
Definition: Error.cpp:23
unsigned ErrorsPrinted
Definition: Error.cpp:24
void PrintNote(const Twine &Msg)
Definition: Error.cpp:42
void PrintWarning(ArrayRef< SMLoc > WarningLoc, const Twine &Msg)
Definition: Error.cpp:48
#define LLVM_ATTRIBUTE_NORETURN
Definition: Compiler.h:242
LLVM_ATTRIBUTE_NORETURN void PrintFatalError(const Twine &Msg)
Definition: Error.cpp:68
void PrintError(ArrayRef< SMLoc > ErrorLoc, const Twine &Msg)
Definition: Error.cpp:58