[MC] Move getBinOpPrecedence into AsmParser. NFC.

In preparation for a future patch.

llvm-svn: 235950
This commit is contained in:
Ahmed Bougacha 2015-04-28 00:17:39 +00:00
parent f3e86a7a55
commit 457852f9f7
1 changed files with 5 additions and 2 deletions

View File

@ -326,6 +326,9 @@ private:
bool parseAssignment(StringRef Name, bool allow_redef,
bool NoDeadStrip = false);
unsigned getBinOpPrecedence(AsmToken::TokenKind K,
MCBinaryExpr::Opcode &Kind);
bool parseBinOpRHS(unsigned Precedence, const MCExpr *&Res, SMLoc &EndLoc);
bool parseParenExpr(const MCExpr *&Res, SMLoc &EndLoc);
bool parseBracketExpr(const MCExpr *&Res, SMLoc &EndLoc);
@ -1072,8 +1075,8 @@ bool AsmParser::parseAbsoluteExpression(int64_t &Res) {
return false;
}
static unsigned getBinOpPrecedence(AsmToken::TokenKind K,
MCBinaryExpr::Opcode &Kind) {
unsigned AsmParser::getBinOpPrecedence(AsmToken::TokenKind K,
MCBinaryExpr::Opcode &Kind) {
switch (K) {
default:
return 0; // not a binop.