[compiler-rt] [rtsan] Add exit statistics (PR #109885)
Chris Apple via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 25 11:58:31 PDT 2024
================
@@ -44,9 +45,15 @@ static InitializationState GetInitializationState() {
atomic_load(&rtsan_initialized, memory_order_acquire));
}
+static void RtsanAtexit() { PrintStatisticsSummary(); }
+
static auto OnViolationAction(DiagnosticsInfo info) {
return [info]() {
- __rtsan::PrintDiagnostics(info);
+ if (flags().print_stats_on_exit)
+ IncrementTotalErrorCount();
----------------
cjappl wrote:
removed the if, if we are even on the fence i'd opt to clean up the control flow.
Thanks for your feedback on this one, submitting
https://github.com/llvm/llvm-project/pull/109885
More information about the llvm-commits
mailing list