[compiler-rt] [rtsan] Add exit statistics (PR #109885)
Florian Mayer via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 24 17:49:52 PDT 2024
================
@@ -0,0 +1,35 @@
+//===--- rtsan_stats.cpp - Realtime Sanitizer -------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// Part of the RealtimeSanitizer runtime library
+//
+//===----------------------------------------------------------------------===//
+
+#include "rtsan/rtsan_stats.h"
+
+#include "sanitizer_common/sanitizer_atomic.h"
+#include "sanitizer_common/sanitizer_common.h"
+
+using namespace __sanitizer;
+using namespace __rtsan;
+
+static atomic_uint32_t rtsan_total_error_count{0};
+
+void __rtsan::IncrementTotalErrorCount() {
----------------
fmayer wrote:
Why don't you put stuff into `namespace __rtsan`?
https://github.com/llvm/llvm-project/pull/109885
More information about the llvm-commits
mailing list