Modified MCAsmLexer to return error information upward
rather than printing it locally, reducing its dependence
on SourceMgr.

llvm-svn: 94041
diff --git a/llvm/tools/llvm-mc/AsmLexer.cpp b/llvm/tools/llvm-mc/AsmLexer.cpp
index ba0d247..758fac4 100644
--- a/llvm/tools/llvm-mc/AsmLexer.cpp
+++ b/llvm/tools/llvm-mc/AsmLexer.cpp
@@ -44,7 +44,8 @@
 /// ReturnError - Set the error to the specified string at the specified
 /// location.  This is defined to always return AsmToken::Error.
 AsmToken AsmLexer::ReturnError(const char *Loc, const std::string &Msg) {
-  PrintMessage(SMLoc::getFromPointer(Loc), Msg, "error");
+  SetError(SMLoc::getFromPointer(Loc), Msg);
+  
   return AsmToken(AsmToken::Error, StringRef(Loc, 0));
 }