[llvm] 678ccd5 - [IR] Remove an unnecessary cast (NFC) (#146274)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 29 19:19:35 PDT 2025
Author: Kazu Hirata
Date: 2025-06-29T19:19:31-07:00
New Revision: 678ccd5e536d457bde3dbd5d9a24e23024549b3e
URL: https://github.com/llvm/llvm-project/commit/678ccd5e536d457bde3dbd5d9a24e23024549b3e
DIFF: https://github.com/llvm/llvm-project/commit/678ccd5e536d457bde3dbd5d9a24e23024549b3e.diff
LOG: [IR] Remove an unnecessary cast (NFC) (#146274)
DT is already of DIType *.
Added:
Modified:
llvm/lib/IR/DebugInfo.cpp
Removed:
################################################################################
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