[llvm] [IR] Remove an unnecessary cast (NFC) (PR #147205)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 6 10:59:46 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-ir
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
Tys is already of Type **.
---
Full diff: https://github.com/llvm/llvm-project/pull/147205.diff
1 Files Affected:
- (modified) llvm/include/llvm/IR/Type.h (+1-1)
``````````diff
diff --git a/llvm/include/llvm/IR/Type.h b/llvm/include/llvm/IR/Type.h
index fd987179645dd..74dd490729741 100644
--- a/llvm/include/llvm/IR/Type.h
+++ b/llvm/include/llvm/IR/Type.h
@@ -515,7 +515,7 @@ inline Type **unwrap(LLVMTypeRef* Tys) {
}
inline LLVMTypeRef *wrap(Type **Tys) {
- return reinterpret_cast<LLVMTypeRef*>(const_cast<Type**>(Tys));
+ return reinterpret_cast<LLVMTypeRef *>(Tys);
}
} // end namespace llvm
``````````
</details>
https://github.com/llvm/llvm-project/pull/147205
More information about the llvm-commits
mailing list