Skip to content

Commit 5a3f1ac

Browse files
authored
[LLParser] Remove redundant code (NFC) (#120478)
1 parent 30f386c commit 5a3f1ac

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/AsmParser/LLParser.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7796,12 +7796,10 @@ bool LLParser::parseCast(Instruction *&Inst, PerFunctionState &PFS,
77967796
parseType(DestTy))
77977797
return true;
77987798

7799-
if (!CastInst::castIsValid((Instruction::CastOps)Opc, Op, DestTy)) {
7800-
CastInst::castIsValid((Instruction::CastOps)Opc, Op, DestTy);
7799+
if (!CastInst::castIsValid((Instruction::CastOps)Opc, Op, DestTy))
78017800
return error(Loc, "invalid cast opcode for cast from '" +
78027801
getTypeString(Op->getType()) + "' to '" +
78037802
getTypeString(DestTy) + "'");
7804-
}
78057803
Inst = CastInst::Create((Instruction::CastOps)Opc, Op, DestTy);
78067804
return false;
78077805
}

0 commit comments

Comments
 (0)