diff options
Diffstat (limited to 'tools/llvm-mc/AsmLexer.cpp')
-rw-r--r-- | tools/llvm-mc/AsmLexer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/llvm-mc/AsmLexer.cpp b/tools/llvm-mc/AsmLexer.cpp index ba0d247d46..758fac4cd2 100644 --- a/tools/llvm-mc/AsmLexer.cpp +++ b/tools/llvm-mc/AsmLexer.cpp @@ -44,7 +44,8 @@ void AsmLexer::PrintMessage(SMLoc Loc, const std::string &Msg, /// 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)); } |