[llvm-commits] [llvm] r81997 - /llvm/trunk/tools/llvm-mc/AsmParser.cpp
Chris Lattner
sabre at nondot.org
Tue Sep 15 21:12:51 PDT 2009
Author: lattner
Date: Tue Sep 15 23:12:47 2009
New Revision: 81997
URL: http://llvm.org/viewvc/llvm-project?rev=81997&view=rev
Log:
use an accessor to simplify code.
Modified:
llvm/trunk/tools/llvm-mc/AsmParser.cpp
Modified: llvm/trunk/tools/llvm-mc/AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mc/AsmParser.cpp?rev=81997&r1=81996&r2=81997&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mc/AsmParser.cpp (original)
+++ llvm/trunk/tools/llvm-mc/AsmParser.cpp Tue Sep 15 23:12:47 2009
@@ -208,15 +208,12 @@
Res = MCUnaryExpr::CreateLNot(Res, getContext());
return false;
case AsmToken::String:
- case AsmToken::Identifier: {
+ case AsmToken::Identifier:
// This is a label, this should be parsed as part of an expression, to
// handle things like LFOO+4.
- MCSymbol *Sym = CreateSymbol(Lexer.getTok().getIdentifier());
-
- Res = MCSymbolRefExpr::Create(Sym, getContext());
+ Res = MCSymbolRefExpr::Create(Lexer.getTok().getIdentifier(), getContext());
Lexer.Lex(); // Eat identifier.
return false;
- }
case AsmToken::Integer:
Res = MCConstantExpr::Create(Lexer.getTok().getIntVal(), getContext());
Lexer.Lex(); // Eat token.
More information about the llvm-commits
mailing list