diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-09-16 04:12:47 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-09-16 04:12:47 +0000 |
| commit | c6a889d0b6327c526cb1bceef555716d0eef75ae (patch) | |
| tree | c8a08c897a1177a24ac53d69397e4683f240492d /llvm/tools/llvm-mc/AsmParser.cpp | |
| parent | 1ae49ee7ca794dca821f8df116219d715ad729db (diff) | |
| download | bcm5719-llvm-c6a889d0b6327c526cb1bceef555716d0eef75ae.tar.gz bcm5719-llvm-c6a889d0b6327c526cb1bceef555716d0eef75ae.zip | |
use an accessor to simplify code.
llvm-svn: 81997
Diffstat (limited to 'llvm/tools/llvm-mc/AsmParser.cpp')
| -rw-r--r-- | llvm/tools/llvm-mc/AsmParser.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/tools/llvm-mc/AsmParser.cpp b/llvm/tools/llvm-mc/AsmParser.cpp index b1e8e9ae404..1f59e743428 100644 --- a/llvm/tools/llvm-mc/AsmParser.cpp +++ b/llvm/tools/llvm-mc/AsmParser.cpp @@ -208,15 +208,12 @@ bool AsmParser::ParsePrimaryExpr(const MCExpr *&Res) { 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. |

