@@ -1941,14 +1941,12 @@ unsigned DWARFVerifier::verifyNameIndexCompleteness(
1941
1941
if (none_of (NI.equal_range (Name), [&](const DWARFDebugNames::Entry &E) {
1942
1942
return E.getDIEUnitOffset () == DieUnitOffset;
1943
1943
})) {
1944
- ErrorCategory.Report (
1945
- " Name Index DIE entry missing name" ,
1946
- llvm::dwarf::TagString (Die.getTag ()), [&]() {
1947
- error () << formatv (
1948
- " Name Index @ {0:x}: Entry for DIE @ {1:x} ({2}) with "
1949
- " name {3} missing.\n " ,
1950
- NI.getUnitOffset (), Die.getOffset (), Die.getTag (), Name);
1951
- });
1944
+ ErrorCategory.Report (" Name Index DIE entry missing name" , [&]() {
1945
+ error () << formatv (
1946
+ " Name Index @ {0:x}: Entry for DIE @ {1:x} ({2}) with "
1947
+ " name {3} missing.\n " ,
1948
+ NI.getUnitOffset (), Die.getOffset (), Die.getTag (), Name);
1949
+ });
1952
1950
++NumErrors;
1953
1951
}
1954
1952
}
@@ -2170,35 +2168,15 @@ bool DWARFVerifier::verifyDebugStrOffsets(
2170
2168
2171
2169
void OutputCategoryAggregator::Report (
2172
2170
StringRef s, std::function<void (void )> detailCallback) {
2173
- this ->Report (s, " " , detailCallback);
2174
- }
2175
-
2176
- void OutputCategoryAggregator::Report (
2177
- StringRef category, StringRef sub_category,
2178
- std::function<void (void )> detailCallback) {
2179
- std::string category_str = std::string (category);
2180
- AggregationData *Agg = &Aggregation[category_str];
2181
- Agg->OverallCount ++;
2182
- if (!sub_category.empty ()) {
2183
- Agg->DetailedCounts [std::string (sub_category)]++;
2184
- }
2171
+ Aggregation[std::string (s)]++;
2185
2172
if (IncludeDetail)
2186
2173
detailCallback ();
2187
2174
}
2188
2175
2189
2176
void OutputCategoryAggregator::EnumerateResults (
2190
2177
std::function<void (StringRef, unsigned )> handleCounts) {
2191
- for (auto &&[name, aggData] : Aggregation) {
2192
- handleCounts (name, aggData.OverallCount );
2193
- }
2194
- }
2195
- void OutputCategoryAggregator::EnumerateDetailedResultsFor (
2196
- StringRef category, std::function<void (StringRef, unsigned )> handleCounts) {
2197
- auto Agg = Aggregation.find (std::string (category));
2198
- if (Agg != Aggregation.end ()) {
2199
- for (auto &&[name, count] : Agg->second .DetailedCounts ) {
2200
- handleCounts (name, count);
2201
- }
2178
+ for (auto &&[name, count] : Aggregation) {
2179
+ handleCounts (name, count);
2202
2180
}
2203
2181
}
2204
2182
@@ -2225,12 +2203,6 @@ void DWARFVerifier::summarize() {
2225
2203
ErrorCategory.EnumerateResults ([&](StringRef Category, unsigned Count) {
2226
2204
llvm::json::Object Val;
2227
2205
Val.try_emplace (" count" , Count);
2228
- llvm::json::Object Details;
2229
- ErrorCategory.EnumerateDetailedResultsFor (
2230
- Category, [&](StringRef SubCategory, unsigned SubCount) {
2231
- Details.try_emplace (SubCategory, SubCount);
2232
- });
2233
- Val.try_emplace (" details" , std::move (Details));
2234
2206
Categories.try_emplace (Category, std::move (Val));
2235
2207
ErrorCount += Count;
2236
2208
});
0 commit comments