[llvm] [IR] Remove an unnecessary cast (NFC) (PR #146274)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 29 09:36:25 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-debuginfo
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
DT is already of DIType *.
---
Full diff: https://github.com/llvm/llvm-project/pull/146274.diff
1 Files Affected:
- (modified) llvm/lib/IR/DebugInfo.cpp (+1-1)
``````````diff
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;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/146274
More information about the llvm-commits
mailing list