aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWesley Peck <peckw@wesleypeck.com>2010-11-11 18:41:33 +0000
committerWesley Peck <peckw@wesleypeck.com>2010-11-11 18:41:33 +0000
commit60f923c5e2d752ce5c6e042db8279122eff798dd (patch)
tree5a270d4b03061c227177d9adb498ae13f431185c
parentaf510f16ecf54a01003f06d5a1a3e05c8b576a47 (diff)
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
-rw-r--r--lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp b/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp
index 80d7f3935a..2534691faf 100644
--- a/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp
+++ b/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp
@@ -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;
}