diff options
author | Jim Grosbach <grosbach@apple.com> | 2012-01-26 15:56:45 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2012-01-26 15:56:45 +0000 |
commit | ef4d3ebe2a36ebfd9370e1efbe74dff13f64c40f (patch) | |
tree | 22f12cc710d55dc53e9d4a811a2de78b181ce435 | |
parent | f18b6fe96d1a16bfc3cd0d6c4e674c707244d78b (diff) | |
download | external_llvm-ef4d3ebe2a36ebfd9370e1efbe74dff13f64c40f.zip external_llvm-ef4d3ebe2a36ebfd9370e1efbe74dff13f64c40f.tar.gz external_llvm-ef4d3ebe2a36ebfd9370e1efbe74dff13f64c40f.tar.bz2 |
Tidy up. Fix mismatched return types for error handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149062 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index ec9baf9..bdaf09b 100644 --- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -2552,16 +2552,12 @@ tryParseRegisterWithWriteBack(SmallVectorImpl<MCParsedAsmOperand*> &Operands) { if (getParser().ParseExpression(ImmVal)) return MatchOperand_ParseFail; const MCConstantExpr *MCE = dyn_cast<MCConstantExpr>(ImmVal); - if (!MCE) { - TokError("immediate value expected for vector index"); - return MatchOperand_ParseFail; - } + if (!MCE) + return TokError("immediate value expected for vector index"); SMLoc E = Parser.getTok().getLoc(); - if (Parser.getTok().isNot(AsmToken::RBrac)) { - Error(E, "']' expected"); - return MatchOperand_ParseFail; - } + if (Parser.getTok().isNot(AsmToken::RBrac)) + return Error(E, "']' expected"); Parser.Lex(); // Eat right bracket token. |