[Alignment][NFC] Migrate Instructions to Align
[llvm-core.git] / include / llvm / TableGen / Error.h
blob7c83b62986205e660d2a473d15adfdc09bcded87
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.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_TABLEGEN_ERROR_H
15 #define LLVM_TABLEGEN_ERROR_H
17 #include "llvm/Support/SourceMgr.h"
19 namespace llvm {
21 void PrintNote(ArrayRef<SMLoc> NoteLoc, const Twine &Msg);
23 void PrintWarning(ArrayRef<SMLoc> WarningLoc, const Twine &Msg);
24 void PrintWarning(const char *Loc, const Twine &Msg);
25 void PrintWarning(const Twine &Msg);
27 void PrintError(ArrayRef<SMLoc> ErrorLoc, const Twine &Msg);
28 void PrintError(const char *Loc, const Twine &Msg);
29 void PrintError(const Twine &Msg);
31 LLVM_ATTRIBUTE_NORETURN void PrintFatalError(const Twine &Msg);
32 LLVM_ATTRIBUTE_NORETURN void PrintFatalError(ArrayRef<SMLoc> ErrorLoc,
33 const Twine &Msg);
35 extern SourceMgr SrcMgr;
36 extern unsigned ErrorsPrinted;
38 } // end namespace "llvm"
40 #endif