aboutsummaryrefslogtreecommitdiff
path: root/lib/TableGen/Error.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2012-05-03 16:50:55 +0000
committerDimitry Andric <dim@FreeBSD.org>2012-05-03 16:50:55 +0000
commitb61ab53cb789e568acbb2952fbead20ab853a696 (patch)
tree8575c732129e272992ac5d7b4c2519238fff4735 /lib/TableGen/Error.cpp
parent63faed5b8e4f2755f127fcb8aa440480c0649327 (diff)
Diffstat (limited to 'lib/TableGen/Error.cpp')
-rw-r--r--lib/TableGen/Error.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/TableGen/Error.cpp b/lib/TableGen/Error.cpp
index 5071ee77ac43..1463b68144a8 100644
--- a/lib/TableGen/Error.cpp
+++ b/lib/TableGen/Error.cpp
@@ -20,6 +20,22 @@ namespace llvm {
SourceMgr SrcMgr;
+void PrintWarning(SMLoc WarningLoc, const Twine &Msg) {
+ SrcMgr.PrintMessage(WarningLoc, SourceMgr::DK_Warning, Msg);
+}
+
+void PrintWarning(const char *Loc, const Twine &Msg) {
+ SrcMgr.PrintMessage(SMLoc::getFromPointer(Loc), SourceMgr::DK_Warning, Msg);
+}
+
+void PrintWarning(const Twine &Msg) {
+ errs() << "warning:" << Msg << "\n";
+}
+
+void PrintWarning(const TGError &Warning) {
+ PrintWarning(Warning.getLoc(), Warning.getMessage());
+}
+
void PrintError(SMLoc ErrorLoc, const Twine &Msg) {
SrcMgr.PrintMessage(ErrorLoc, SourceMgr::DK_Error, Msg);
}