diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-07-28 16:56:42 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-07-28 16:56:42 +0000 |
commit | 07435c2b2866d0424b3f6ec29628a02cde538e5a (patch) | |
tree | a2ad2e40906dbbbb7bd413c54e1cb286a87da3ff /tools/llvm-mc/llvm-mc.cpp | |
parent | f26175c063b38c62bfde37139257676c79aba35d (diff) | |
download | external_llvm-07435c2b2866d0424b3f6ec29628a02cde538e5a.zip external_llvm-07435c2b2866d0424b3f6ec29628a02cde538e5a.tar.gz external_llvm-07435c2b2866d0424b3f6ec29628a02cde538e5a.tar.bz2 |
Switch AsmLexer::Lex to returning a reference to the current token.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77328 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-mc/llvm-mc.cpp')
-rw-r--r-- | tools/llvm-mc/llvm-mc.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tools/llvm-mc/llvm-mc.cpp b/tools/llvm-mc/llvm-mc.cpp index 63cb70d..a64c8a6 100644 --- a/tools/llvm-mc/llvm-mc.cpp +++ b/tools/llvm-mc/llvm-mc.cpp @@ -83,9 +83,8 @@ static int AsLexInput(const char *ProgName) { bool Error = false; - AsmToken::TokenKind Tok = Lexer.Lex(); - while (Tok != AsmToken::Eof) { - switch (Tok) { + while (Lexer.Lex().isNot(AsmToken::Eof)) { + switch (Lexer.getKind()) { default: Lexer.PrintMessage(Lexer.getLoc(), "unknown token", "warning"); Error = true; @@ -136,8 +135,6 @@ static int AsLexInput(const char *ProgName) { case AsmToken::Star: outs() << "Star\n"; break; case AsmToken::Tilde: outs() << "Tilde\n"; break; } - - Tok = Lexer.Lex(); } return Error; |