[TableGen] Write one of the Record constructors in terms of the other constructor...
[oota-llvm.git] / include / llvm / TableGen / Error.h
index 3f7b7f4e8c41bd4d3a95c7ef412024a5d6a99a50..3df658df8809abca6a0c966f0524c1b329bae498 100644 (file)
 
 namespace llvm {
 
-class TGError {
-  SmallVector<SMLoc, 4> Locs;
-  std::string Message;
-public:
-  TGError(ArrayRef<SMLoc> locs, const std::string &message)
-    : Locs(locs.begin(), locs.end()), Message(message) {}
-
-  ArrayRef<SMLoc> getLoc() const { return Locs; }
-  const std::string &getMessage() const { return Message; }
-};
-
 void PrintWarning(ArrayRef<SMLoc> WarningLoc, const Twine &Msg);
 void PrintWarning(const char *Loc, const Twine &Msg);
 void PrintWarning(const Twine &Msg);
-void PrintWarning(const TGError &Warning);
 
 void PrintError(ArrayRef<SMLoc> ErrorLoc, const Twine &Msg);
 void PrintError(const char *Loc, const Twine &Msg);
 void PrintError(const Twine &Msg);
-void PrintError(const TGError &Error);
 
-LLVM_ATTRIBUTE_NORETURN void PrintFatalError(const std::string &Msg);
+LLVM_ATTRIBUTE_NORETURN void PrintFatalError(const Twine &Msg);
 LLVM_ATTRIBUTE_NORETURN void PrintFatalError(ArrayRef<SMLoc> ErrorLoc,
-                                             const std::string &Msg);
+                                             const Twine &Msg);
 
 extern SourceMgr SrcMgr;
-
+extern unsigned ErrorsPrinted;
 
 } // end namespace "llvm"