From 8f3050684ef22aa8403c3820e89ebef915136bf7 Mon Sep 17 00:00:00 2001 From: Maksim Panchenko Date: Tue, 20 Aug 2024 13:41:19 -0700 Subject: [PATCH] [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. --- bolt/lib/Core/BinaryFunction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bolt/lib/Core/BinaryFunction.cpp b/bolt/lib/Core/BinaryFunction.cpp index e5c6d551e42a..af982fd60b17 100644 --- a/bolt/lib/Core/BinaryFunction.cpp +++ b/bolt/lib/Core/BinaryFunction.cpp @@ -2502,7 +2502,7 @@ void BinaryFunction::annotateCFIState() { } } - if (!StateStack.empty()) { + if (opts::Verbosity >= 1 && !StateStack.empty()) { BC.errs() << "BOLT-WARNING: non-empty CFI stack at the end of " << *this << '\n'; }