[llvm] [IR] Remove an unnecessary cast (NFC) (PR #146250)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 28 18:08:39 PDT 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/146250
Agg is already of Type *.
>From b2ef32635cf62e54dc0de57cc6dd3b29e45bcae2 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sat, 28 Jun 2025 13:07:24 -0700
Subject: [PATCH] [IR] Remove an unnecessary cast (NFC)
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 8d9b545d4134f..3cfee89a1fdf5 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<Type*>(Agg);
+ return Agg;
}
//===----------------------------------------------------------------------===//
More information about the llvm-commits
mailing list