Don't analyze block if it's not considered for ifcvt anymore.
[llvm/stm8.git] / utils / TableGen / Error.h
blobb3a01461940d1ec40cbf8d9e8c58c40f9c2370a1
1 //===- Error.h - tblgen error handling helper routines ----------*- 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.
13 //===----------------------------------------------------------------------===//
15 #ifndef ERROR_H
16 #define ERROR_H
18 #include "llvm/Support/SourceMgr.h"
20 namespace llvm {
22 class TGError {
23 SMLoc Loc;
24 std::string Message;
25 public:
26 TGError(SMLoc loc, const std::string &message) : Loc(loc), Message(message) {}
28 SMLoc getLoc() const { return Loc; }
29 const std::string &getMessage() const { return Message; }
32 void PrintError(SMLoc ErrorLoc, const Twine &Msg);
33 void PrintError(const char *Loc, const Twine &Msg);
34 void PrintError(const Twine &Msg);
35 void PrintError(const TGError &Error);
38 extern SourceMgr SrcMgr;
41 } // end namespace "llvm"
43 #endif