[llvm] 5a3f1ac - [LLParser] Remove redundant code (NFC) (#120478)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 19 02:48:33 PST 2024
Author: Pedro Lobo
Date: 2024-12-19T11:48:29+01:00
New Revision: 5a3f1acad7e8ce0e8cb90165794dce71f4b80bcd
URL: https://github.com/llvm/llvm-project/commit/5a3f1acad7e8ce0e8cb90165794dce71f4b80bcd
DIFF: https://github.com/llvm/llvm-project/commit/5a3f1acad7e8ce0e8cb90165794dce71f4b80bcd.diff
LOG: [LLParser] Remove redundant code (NFC) (#120478)
Added:
Modified:
llvm/lib/AsmParser/LLParser.cpp
Removed:
################################################################################
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index 558ab3af632117..52d48a69f0eb53 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -7796,12 +7796,10 @@ bool LLParser::parseCast(Instruction *&Inst, PerFunctionState &PFS,
parseType(DestTy))
return true;
- if (!CastInst::castIsValid((Instruction::CastOps)Opc, Op, DestTy)) {
- CastInst::castIsValid((Instruction::CastOps)Opc, Op, DestTy);
+ if (!CastInst::castIsValid((Instruction::CastOps)Opc, Op, DestTy))
return error(Loc, "invalid cast opcode for cast from '" +
getTypeString(Op->getType()) + "' to '" +
getTypeString(DestTy) + "'");
- }
Inst = CastInst::Create((Instruction::CastOps)Opc, Op, DestTy);
return false;
}
More information about the llvm-commits
mailing list