[llvm] [ARM] Remove an unnecessary cast (NFC) (PR #155206)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 24 21:30:05 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-arm
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
getType() already returns Type *.
---
Full diff: https://github.com/llvm/llvm-project/pull/155206.diff
1 Files Affected:
- (modified) llvm/lib/Target/ARM/ARMISelLowering.cpp (+1-1)
``````````diff
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp
index 12d2d678ff63a..40f636c49bf3d 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -3403,7 +3403,7 @@ SDValue ARMTargetLowering::LowerConstantPool(SDValue Op,
// position-independent addressing modes.
if (Subtarget->genExecuteOnly()) {
auto AFI = DAG.getMachineFunction().getInfo<ARMFunctionInfo>();
- auto T = const_cast<Type*>(CP->getType());
+ auto *T = CP->getType();
auto C = const_cast<Constant*>(CP->getConstVal());
auto M = DAG.getMachineFunction().getFunction().getParent();
auto GV = new GlobalVariable(
``````````
</details>
https://github.com/llvm/llvm-project/pull/155206
More information about the llvm-commits
mailing list