[llvm] [IR] Remove an unnecessary cast (NFC) (PR #146250)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 28 18:09:07 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-ir
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
Agg is already of Type *.
---
Full diff: https://github.com/llvm/llvm-project/pull/146250.diff
1 Files Affected:
- (modified) llvm/lib/IR/Instructions.cpp (+1-1)
``````````diff
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;
}
//===----------------------------------------------------------------------===//
``````````
</details>
https://github.com/llvm/llvm-project/pull/146250
More information about the llvm-commits
mailing list