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 UniqueLines; DenseSet UniqueNonZeroLines; - for (const auto &CU : static_cast(&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.