[llvm] [BOLT] Turn non-empty CFI StateStack assert into a warning (PR #102216)

via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 6 13:30:39 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-bolt

Author: Amir Ayupov (aaupov)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/102216.diff


1 Files Affected:

- (modified) bolt/lib/Core/BinaryFunction.cpp (+4-1) 


``````````diff
diff --git a/bolt/lib/Core/BinaryFunction.cpp b/bolt/lib/Core/BinaryFunction.cpp
index ea09371b57e8a..e5c6d551e42a7 100644
--- a/bolt/lib/Core/BinaryFunction.cpp
+++ b/bolt/lib/Core/BinaryFunction.cpp
@@ -2502,7 +2502,10 @@ void BinaryFunction::annotateCFIState() {
     }
   }
 
-  assert(StateStack.empty() && "corrupt CFI stack");
+  if (!StateStack.empty()) {
+    BC.errs() << "BOLT-WARNING: non-empty CFI stack at the end of " << *this
+              << '\n';
+  }
 }
 
 namespace {

``````````

</details>


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


More information about the llvm-commits mailing list