diff options
author | Wesley Peck <peckw@wesleypeck.com> | 2010-11-11 18:41:33 +0000 |
---|---|---|
committer | Wesley Peck <peckw@wesleypeck.com> | 2010-11-11 18:41:33 +0000 |
commit | d1a6f5a384900647f3379451597b82fbd1a6bde9 (patch) | |
tree | ea59decbe7b1519212a48b1e36b94312ed9d3f16 /llvm/lib | |
parent | 932aab3cbf7ed5d0b6f08eb2426a2afa2db408c8 (diff) | |
download | bcm5719-llvm-d1a6f5a384900647f3379451597b82fbd1a6bde9.tar.gz bcm5719-llvm-d1a6f5a384900647f3379451597b82fbd1a6bde9.zip |
Fixed some bugs in MBlaze asm parser that were introduced when removing OwningPtrs from the code.
llvm-svn: 118807
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp b/llvm/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp index 80d7f3935a9..2534691faf4 100644 --- a/llvm/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp +++ b/llvm/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; } |