mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
Fixed some bugs in MBlaze asm parser that were introduced when removing OwningPtrs from the code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118807 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
af510f16ec
commit
60f923c5e2
@ -446,15 +446,15 @@ ParseOperand(SmallVectorImpl<MCParsedAsmOperand*> &Operands) {
|
||||
if (!Op)
|
||||
Op = ParseImmediate();
|
||||
|
||||
// Move past the parsed token in the token stream
|
||||
getLexer().Lex();
|
||||
|
||||
// If the token could not be parsed then fail
|
||||
if (!Op) {
|
||||
Error(Parser.getTok().getLoc(), "unknown operand");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Move past the parsed token in the token stream
|
||||
getLexer().Lex();
|
||||
|
||||
// Push the parsed operand into the list of operands
|
||||
Operands.push_back(Op);
|
||||
return Op;
|
||||
@ -472,7 +472,7 @@ ParseInstruction(StringRef Name, SMLoc NameLoc,
|
||||
return false;
|
||||
|
||||
// Parse the first operand
|
||||
if (ParseOperand(Operands))
|
||||
if (!ParseOperand(Operands))
|
||||
return true;
|
||||
|
||||
while (getLexer().isNot(AsmToken::EndOfStatement) &&
|
||||
@ -485,7 +485,7 @@ ParseInstruction(StringRef Name, SMLoc NameLoc,
|
||||
getLexer().Lex();
|
||||
|
||||
// Parse the next operand
|
||||
if (ParseOperand(Operands))
|
||||
if (!ParseOperand(Operands))
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user