summaryrefslogtreecommitdiffstats
path: root/tools/llvm-mc/AsmLexer.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-06-21 21:22:11 +0000
committerChris Lattner <sabre@nondot.org>2009-06-21 21:22:11 +0000
commit14ee48a5bae352780b767a14bd97e8e91800a95b (patch)
tree5ff109bb82dfebe414bbd54f6a7cbe1a0e0e0f4c /tools/llvm-mc/AsmLexer.cpp
parentb0789ed5a45a90ee7ff398fcdc1383b49ee88918 (diff)
downloadexternal_llvm-14ee48a5bae352780b767a14bd97e8e91800a95b.zip
external_llvm-14ee48a5bae352780b767a14bd97e8e91800a95b.tar.gz
external_llvm-14ee48a5bae352780b767a14bd97e8e91800a95b.tar.bz2
rename SourceMgr::PrintError to PrintMessage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73861 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-mc/AsmLexer.cpp')
-rw-r--r--tools/llvm-mc/AsmLexer.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/tools/llvm-mc/AsmLexer.cpp b/tools/llvm-mc/AsmLexer.cpp
index cf6a4a8..740215b 100644
--- a/tools/llvm-mc/AsmLexer.cpp
+++ b/tools/llvm-mc/AsmLexer.cpp
@@ -29,18 +29,14 @@ SMLoc AsmLexer::getLoc() const {
return SMLoc::getFromPointer(TokStart);
}
-void AsmLexer::PrintError(const char *Loc, const std::string &Msg) const {
- SrcMgr.PrintError(SMLoc::getFromPointer(Loc), Msg);
-}
-
-void AsmLexer::PrintError(SMLoc Loc, const std::string &Msg) const {
- SrcMgr.PrintError(Loc, Msg);
+void AsmLexer::PrintMessage(SMLoc Loc, const std::string &Msg) const {
+ SrcMgr.PrintMessage(Loc, Msg);
}
/// ReturnError - Set the error to the specified string at the specified
/// location. This is defined to always return asmtok::Error.
asmtok::TokKind AsmLexer::ReturnError(const char *Loc, const std::string &Msg) {
- PrintError(Loc, Msg);
+ SrcMgr.PrintMessage(SMLoc::getFromPointer(Loc), Msg);
return asmtok::Error;
}
@@ -203,10 +199,8 @@ asmtok::TokKind AsmLexer::LexQuote() {
CurChar = getNextChar();
}
- if (CurChar == EOF) {
- PrintError(TokStart, "unterminated string constant");
- return asmtok::Eof;
- }
+ if (CurChar == EOF)
+ return ReturnError(TokStart, "unterminated string constant");
CurChar = getNextChar();
}