[PATCH] D144653: do not collect CFI info on empty functions
Sebastian Pop via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 23 09:54:46 PST 2023
sebpop updated this revision to Diff 499904.
sebpop retitled this revision from "remove assert in addCFIInstruction" to "do not collect CFI info on empty functions".
sebpop added a comment.
Instead of removing the assert, the patch avoids collecting CFI info on functions without instructions.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144653/new/
https://reviews.llvm.org/D144653
Files:
bolt/lib/Rewrite/RewriteInstance.cpp
Index: bolt/lib/Rewrite/RewriteInstance.cpp
===================================================================
--- bolt/lib/Rewrite/RewriteInstance.cpp
+++ bolt/lib/Rewrite/RewriteInstance.cpp
@@ -3115,7 +3115,8 @@
}
// Fill in CFI information for this function
- if (!Function.trapsOnEntry() && !CFIRdWrt->fillCFIInfoFor(Function)) {
+ if (!Function.Instructions.empty() && !Function.trapsOnEntry() &&
+ !CFIRdWrt->fillCFIInfoFor(Function)) {
if (BC->HasRelocations) {
BC->exitWithBugReport("unable to fill CFI.", Function);
} else {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144653.499904.patch
Type: text/x-patch
Size: 584 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230223/d2d73849/attachment.bin>
More information about the llvm-commits
mailing list