Skip to content

Commit 8f30506

Browse files
authored
[BOLT] Reduce CFI warning verbosity (#105336)
CFI programs may have more saves than restores and this is completely benign from BOLT's perspective. Reduce the verbosity and print the warning only under `-v=1` and above.
1 parent 0c48986 commit 8f30506

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bolt/lib/Core/BinaryFunction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2502,7 +2502,7 @@ void BinaryFunction::annotateCFIState() {
25022502
}
25032503
}
25042504

2505-
if (!StateStack.empty()) {
2505+
if (opts::Verbosity >= 1 && !StateStack.empty()) {
25062506
BC.errs() << "BOLT-WARNING: non-empty CFI stack at the end of " << *this
25072507
<< '\n';
25082508
}

0 commit comments

Comments
 (0)