Skip to content

Commit 5a85798

Browse files
committed
Don't clamp to 1000000
1 parent 6824654 commit 5a85798

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

clang/lib/CodeGen/BackendUtil.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -812,14 +812,13 @@ static void addSanitizers(const Triple &TargetTriple,
812812
LowerAllowCheckPass::Options Opts;
813813

814814
// SanitizeSkipHotCutoffs stores doubles with range [0, 1]
815-
// Opts.cutoffs wants ints with range [0, 999999]
815+
// Opts.cutoffs wants ints with range [0, 1000000]
816816
for (unsigned int i = 0; i < SanitizerKind::SO_Count; ++i) {
817817
std::optional<double> maybeCutoff =
818818
CodeGenOpts.SanitizeSkipHotCutoffs[i];
819819
if (maybeCutoff.has_value() &&
820820
(maybeCutoff.value() > SanitizerMaskCutoffsEps)) {
821-
Opts.cutoffs.push_back(
822-
std::clamp((int)(maybeCutoff.value() * 1000000), 0, 999999));
821+
Opts.cutoffs.push_back(maybeCutoff.value() * 1000000);
823822
} else {
824823
// Default is don't skip the check
825824
Opts.cutoffs.push_back(0);

0 commit comments

Comments
 (0)