[llvm] 8ba7d80 - [llvm-dwarfdump] Remove an unnecessary cast (NFC) (#148117)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 11 09:52:53 PDT 2025


Author: Kazu Hirata
Date: 2025-07-11T09:52:49-07:00
New Revision: 8ba7d805de3a7e1ac339fea27dbafb33ac4304e4

URL: https://github.com/llvm/llvm-project/commit/8ba7d805de3a7e1ac339fea27dbafb33ac4304e4
DIFF: https://github.com/llvm/llvm-project/commit/8ba7d805de3a7e1ac339fea27dbafb33ac4304e4.diff

LOG: [llvm-dwarfdump] Remove an unnecessary cast (NFC) (#148117)

&DICtx is already of DWARFContext *.

Added: 
    

Modified: 
    llvm/tools/llvm-dwarfdump/Statistics.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/tools/llvm-dwarfdump/Statistics.cpp b/llvm/tools/llvm-dwarfdump/Statistics.cpp
index f92b2b55fa8dc..a705e7d51d874 100644
--- a/llvm/tools/llvm-dwarfdump/Statistics.cpp
+++ b/llvm/tools/llvm-dwarfdump/Statistics.cpp
@@ -878,7 +878,7 @@ bool dwarfdump::collectStatsForObjectFile(ObjectFile &Obj, DWARFContext &DICtx,
   DenseSet<LineTuple> UniqueLines;
   DenseSet<LineTuple> UniqueNonZeroLines;
 
-  for (const auto &CU : static_cast<DWARFContext *>(&DICtx)->compile_units()) {
+  for (const auto &CU : DICtx.compile_units()) {
     if (DWARFDie CUDie = CU->getNonSkeletonUnitDIE(false)) {
       // This variable holds variable information for functions with
       // abstract_origin, but just for the current CU.


        


More information about the llvm-commits mailing list