From 8a4b6cd8d80dbff55601e3291a71e0053793c108 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 28 Jun 2025 20:41:24 -0700 Subject: [PATCH] [IR] Remove an unnecessary cast (NFC) (#146250) Agg is already of Type *. --- llvm/lib/IR/Instructions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/IR/Instructions.cpp b/llvm/lib/IR/Instructions.cpp index 8d9b545d4134..3cfee89a1fdf 100644 --- a/llvm/lib/IR/Instructions.cpp +++ b/llvm/lib/IR/Instructions.cpp @@ -2582,7 +2582,7 @@ Type *ExtractValueInst::getIndexedType(Type *Agg, return nullptr; } } - return const_cast(Agg); + return Agg; } //===----------------------------------------------------------------------===//