MC/AsmParser: Use Error() instead of calling PrintMessage() directly.
authorDaniel Dunbar <daniel@zuster.org>
Sun, 18 Jul 2010 18:31:45 +0000 (18:31 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Sun, 18 Jul 2010 18:31:45 +0000 (18:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108648 91177308-0d34-0410-b5e6-96231b3b80d8

lib/MC/MCParser/AsmParser.cpp

index c9ac95a78339048dd4f74c7c45ef2ce1f4bb3ab1..8ae4fcb514b6e590bf2a55935525d6ff1fe60175 100644 (file)
@@ -249,7 +249,7 @@ const AsmToken &AsmParser::Lex() {
   }
     
   if (tok->is(AsmToken::Error))
-    PrintMessage(Lexer.getErrLoc(), Lexer.getErr(), "error");
+    Error(Lexer.getErrLoc(), Lexer.getErr());
   
   return *tok;
 }
@@ -1395,9 +1395,7 @@ bool AsmParser::ParseDirectiveInclude() {
   // Attempt to switch the lexer to the included file before consuming the end
   // of statement to avoid losing it when we switch.
   if (EnterIncludeFile(Filename)) {
-    PrintMessage(IncludeLoc,
-                 "Could not find include file '" + Filename + "'",
-                 "error");
+    Error(IncludeLoc, "Could not find include file '" + Filename + "'");
     return true;
   }