Skip to content

Commit c6d827b

Browse files
Kevin Freikevinfrei
authored andcommitted
Updated with Clayborg's feedback from the dwarfdump changes
1 parent 505f8a7 commit c6d827b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -535,13 +535,16 @@ int llvm_gsymutil_main(int argc, char **argv, const llvm::ToolContext &) {
535535
}
536536

537537
llvm::json::Object Categories;
538-
Aggregation.EnumerateResults([&](StringRef category, unsigned count) {
538+
uint64_t ErrorCount = 0;
539+
Aggregation.EnumerateResults([&](StringRef Category, unsigned Count) {
539540
llvm::json::Object Val;
540-
Val.try_emplace("count", count);
541-
Categories.try_emplace(category, std::move(Val));
541+
Val.try_emplace("count", Count);
542+
Categories.try_emplace(Category, std::move(Val));
543+
ErrorCount += Count;
542544
});
543545
llvm::json::Object RootNode;
544546
RootNode.try_emplace("error-categories", std::move(Categories));
547+
RootNode.try_emplace("error-count", ErrorCount);
545548

546549
JsonStream << llvm::json::Value(std::move(RootNode));
547550
}

0 commit comments

Comments
 (0)