[llvm] [LLParser] Remove redundant code (PR #120478)
Pedro Lobo via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 18 12:54:33 PST 2024
https://github.com/pedroclobo created https://github.com/llvm/llvm-project/pull/120478
None
>From 044a15481ea9c7348753239148bb395293df1c2d Mon Sep 17 00:00:00 2001
From: Pedro Lobo <pedro.lobo at tecnico.ulisboa.pt>
Date: Wed, 18 Dec 2024 20:50:06 +0000
Subject: [PATCH] [LLParser] Remove redundant code
---
llvm/lib/AsmParser/LLParser.cpp | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
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