[llvm] [IR] Remove an unnecessary cast (NFC) (PR #147205)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 6 10:59:15 PDT 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/147205
Tys is already of Type **.
>From 1692a800cced736d0f09eee5b1a93cf4a31d5ca9 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sat, 5 Jul 2025 12:29:07 -0700
Subject: [PATCH] [IR] Remove an unnecessary cast (NFC)
Tys is already of Type **.
---
llvm/include/llvm/IR/Type.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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
More information about the llvm-commits
mailing list