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 | 253e466f7a96658151b4c89c871386ec401311a0 (patch) | |
tree | 78ce4a53c85c802bd850f7d9a25a691630b76f79 /tools | |
parent | 63715c73c20ed0358d5774bb481c9437fd234f54 (diff) | |
download | external_llvm-253e466f7a96658151b4c89c871386ec401311a0.zip external_llvm-253e466f7a96658151b4c89c871386ec401311a0.tar.gz external_llvm-253e466f7a96658151b4c89c871386ec401311a0.tar.bz2 |
use an accessor to simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81997 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/llvm-mc/AsmParser.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tools/llvm-mc/AsmParser.cpp b/tools/llvm-mc/AsmParser.cpp index b1e8e9a..1f59e74 100644 --- a/tools/llvm-mc/AsmParser.cpp +++ b/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. |