From e17df0b7f006e5500a90276ea08b2dddb88e6c1b Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 15 Jan 2010 19:39:23 +0000 Subject: fix a bug in range information for $42, eliminate an unneeded argument from ParseExpression. llvm-svn: 93536 --- llvm/tools/llvm-mc/AsmParser.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'llvm/tools/llvm-mc/AsmParser.cpp') diff --git a/llvm/tools/llvm-mc/AsmParser.cpp b/llvm/tools/llvm-mc/AsmParser.cpp index 4e03646fec6..d4af4bd0df6 100644 --- a/llvm/tools/llvm-mc/AsmParser.cpp +++ b/llvm/tools/llvm-mc/AsmParser.cpp @@ -271,8 +271,8 @@ bool AsmParser::ParsePrimaryExpr(const MCExpr *&Res, SMLoc &EndLoc) { } bool AsmParser::ParseExpression(const MCExpr *&Res) { - SMLoc L; - return ParseExpression(Res, L, L); + SMLoc EndLoc; + return ParseExpression(Res, EndLoc); } /// ParseExpression - Parse an expression and return it. @@ -282,9 +282,7 @@ bool AsmParser::ParseExpression(const MCExpr *&Res) { /// expr ::= expr *,/,%,<<,>> expr -> highest. /// expr ::= primaryexpr /// -bool AsmParser::ParseExpression(const MCExpr *&Res, - SMLoc &StartLoc, SMLoc &EndLoc) { - StartLoc = Lexer.getLoc(); +bool AsmParser::ParseExpression(const MCExpr *&Res, SMLoc &EndLoc) { Res = 0; return ParsePrimaryExpr(Res, EndLoc) || ParseBinOpRHS(1, Res, EndLoc); -- cgit v1.2.3