diff options
author | Pedro Lobo <pedro.lobo@tecnico.ulisboa.pt> | 2024-12-19 10:48:29 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-19 11:48:29 +0100 |
commit | 5a3f1acad7e8ce0e8cb90165794dce71f4b80bcd (patch) | |
tree | e7fa30d91a722b8817b04593f3284523cb8ba728 /llvm/lib/AsmParser/LLParser.cpp | |
parent | 30f386cb4d43d0bd8f57c49f68f71defd7dcf968 (diff) | |
download | llvm-5a3f1acad7e8ce0e8cb90165794dce71f4b80bcd.zip llvm-5a3f1acad7e8ce0e8cb90165794dce71f4b80bcd.tar.gz llvm-5a3f1acad7e8ce0e8cb90165794dce71f4b80bcd.tar.bz2 |
[LLParser] Remove redundant code (NFC) (#120478)
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.cpp')
-rw-r--r-- | llvm/lib/AsmParser/LLParser.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp index 558ab3a..52d48a6 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; } |