llvm.org GIT mirror llvm / 3eb6d7f
Revert r179115 as it looks to have killed the ASan tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179120 91177308-0d34-0410-b5e6-96231b3b80d8 Chad Rosier 7 years ago
3 changed file(s) with 5 addition(s) and 17 deletion(s). Raw diff Collapse all Expand all
150150 virtual bool parseExpression(const MCExpr *&Res, SMLoc &EndLoc) = 0;
151151 bool parseExpression(const MCExpr *&Res);
152152
153 /// parsePrimaryExpr - Parse a primary expression.
154 ///
155 /// @param Res - The value of the expression. The result is undefined
156 /// on error.
157 /// @result - False on success.
158 virtual bool parsePrimaryExpr(const MCExpr *&Res, SMLoc &EndLoc) = 0;
159
160153 /// parseParenExpression - Parse an arbitrary expression, assuming that an
161154 /// initial '(' has already been consumed.
162155 ///
220220
221221 bool parseExpression(const MCExpr *&Res);
222222 virtual bool parseExpression(const MCExpr *&Res, SMLoc &EndLoc);
223 virtual bool parsePrimaryExpr(const MCExpr *&Res, SMLoc &EndLoc);
224223 virtual bool parseParenExpression(const MCExpr *&Res, SMLoc &EndLoc);
225224 virtual bool parseAbsoluteExpression(int64_t &Res);
226225
867866 bool AsmParser::parseExpression(const MCExpr *&Res) {
868867 SMLoc EndLoc;
869868 return parseExpression(Res, EndLoc);
870 }
871
872 bool AsmParser::parsePrimaryExpr(const MCExpr *&Res, SMLoc &EndLoc) {
873 return ParsePrimaryExpr(Res, EndLoc);
874869 }
875870
876871 const MCExpr *
11291129 if (ParseRegister(TmpReg, Start, End)) {
11301130 const MCExpr *Disp;
11311131 SMLoc IdentStart = Tok.getLoc();
1132 if (getParser().parsePrimaryExpr(Disp, End))
1132 if (getParser().parseExpression(Disp, End))
11331133 return 0;
11341134
11351135 if (X86Operand *Err = ParseIntelVarWithQualifier(Disp, IdentStart))
11811181 SM.onRegister(TmpReg);
11821182 UpdateLocLex = false;
11831183 break;
1184 } else if (!getParser().parsePrimaryExpr(Disp, End)) {
1184 } else if (!getParser().parseExpression(Disp, End)) {
11851185 SM.onDispExpr();
11861186 UpdateLocLex = false;
11871187 break;
13231323
13241324 const MCExpr *Disp = 0;
13251325 SMLoc IdentStart = Tok.getLoc();
1326 if (getParser().parsePrimaryExpr(Disp, End))
1326 if (getParser().parseExpression(Disp, End))
13271327 return 0;
13281328
13291329 if (!isParsingInlineAsm())
14001400
14011401 SMLoc End;
14021402 const MCExpr *Val;
1403 if (getParser().parsePrimaryExpr(Val, End))
1403 if (getParser().parseExpression(Val, End))
14041404 return ErrorOperand(Start, "Unable to parse expression!");
14051405
14061406 // Don't emit the offset operator.
14361436
14371437 SMLoc End;
14381438 const MCExpr *Val;
1439 if (getParser().parsePrimaryExpr(Val, End))
1439 if (getParser().parseExpression(Val, End))
14401440 return 0;
14411441
14421442 unsigned Length = 0, Size = 0, Type = 0;