[llvm] [IR] Remove an unnecessary cast (NFC) (PR #146274)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 29 09:36:01 PDT 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/146274
DT is already of DIType *.
>From dc18c867758fc85b0a768718aeb156c471b11328 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sat, 28 Jun 2025 20:47:39 -0700
Subject: [PATCH] [IR] Remove an unnecessary cast (NFC)
DT is already of DIType *.
---
llvm/lib/IR/DebugInfo.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index ecb19fd3c82db..d4d8d0376375b 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -376,7 +376,7 @@ bool DebugInfoFinder::addType(DIType *DT) {
if (!NodesSeen.insert(DT).second)
return false;
- TYs.push_back(const_cast<DIType *>(DT));
+ TYs.push_back(DT);
return true;
}
More information about the llvm-commits
mailing list