[clang] [sanitizer] Parse weighted sanitizer args and -fsanitize-skip-hot-cutoff (PR #121619)

Thurston Dang via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 9 21:52:22 PST 2025


================
@@ -14,10 +14,35 @@
 #include "llvm/ADT/Hashing.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/StringSwitch.h"
+#include "llvm/Support/Format.h"
 #include "llvm/Support/MathExtras.h"
+#include "llvm/Support/raw_ostream.h"
+#include <algorithm>
+#include <optional>
 
 using namespace clang;
 
+static const double SanitizerMaskCutoffsEps = 0.000000001f;
+
+void SanitizerMaskCutoffs::set(SanitizerMask K, double V) {
+  if (V < SanitizerMaskCutoffsEps && Cutoffs.empty())
+    return;
+  for (unsigned int i = 0; i < SanitizerKind::SO_Count; i++)
----------------
thurstond wrote:

Fixed in https://github.com/llvm/llvm-project/pull/121619/commits/10e0a5512ed09ce5972668f457fe202d885f2e77. Thanks for the review!

https://github.com/llvm/llvm-project/pull/121619


More information about the cfe-commits mailing list