[llvm] [BPF] Add exception handling support with .bpf_cleanup section (PR #192164)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 14 17:09:25 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h -- llvm/lib/Target/BPF/BPFAsmPrinter.cpp llvm/lib/Target/BPF/BPFAsmPrinter.h llvm/lib/Target/BPF/BPFISelLowering.h --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/BPF/BPFAsmPrinter.cpp b/llvm/lib/Target/BPF/BPFAsmPrinter.cpp
index 6817d06df..df68d5386 100644
--- a/llvm/lib/Target/BPF/BPFAsmPrinter.cpp
+++ b/llvm/lib/Target/BPF/BPFAsmPrinter.cpp
@@ -29,9 +29,9 @@
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCInst.h"
+#include "llvm/MC/MCSectionELF.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSymbol.h"
-#include "llvm/MC/MCSectionELF.h"
#include "llvm/MC/MCSymbolELF.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Support/Compiler.h"
@@ -201,9 +201,8 @@ void BPFAsmPrinter::emitFunctionBodyEnd() {
return;
MCContext &Ctx = OutContext;
- auto *CleanupSec = Ctx.getELFSection(".bpf_cleanup",
- ELF::SHT_PROGBITS,
- ELF::SHF_ALLOC);
+ auto *CleanupSec =
+ Ctx.getELFSection(".bpf_cleanup", ELF::SHT_PROGBITS, ELF::SHF_ALLOC);
OutStreamer->switchSection(CleanupSec);
// Each landing pad has BeginLabels/EndLabels marking the invoke
@@ -227,7 +226,6 @@ void BPFAsmPrinter::emitFunctionBodyEnd() {
// Switch back to the function's section.
OutStreamer->switchSection(MF->getSection());
-
}
MCSymbol *BPFAsmPrinter::getJTPublicSymbol(unsigned JTI) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/192164
More information about the llvm-commits
mailing list