[lld] [LLD][ELF] add bp-* options in ELF (PR #120514)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 6 00:53:22 PST 2025


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 a77346bad0d80a7f7e184f3d6e12c7f532101136 f3b5a177640cf4a59448467946a8c31b99d8e465 --extensions h,cpp -- lld/ELF/BPSectionOrderer.cpp lld/ELF/BPSectionOrderer.h lld/ELF/Config.h lld/ELF/Driver.cpp lld/ELF/Writer.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/lld/ELF/BPSectionOrderer.h b/lld/ELF/BPSectionOrderer.h
index 0fb57d9545..0df6301acf 100644
--- a/lld/ELF/BPSectionOrderer.h
+++ b/lld/ELF/BPSectionOrderer.h
@@ -80,10 +80,10 @@ public:
   SmallVector<std::unique_ptr<BPSymbol>> getSymbols() const override {
     SmallVector<std::unique_ptr<BPSymbol>> symbols;
     for (Symbol *sym : isec->file->getSymbols())
-        if (auto *d = dyn_cast<Defined>(sym)) 
-          if (d->size > 0 && d->section == isec)
-            symbols.emplace_back(std::make_unique<BPSymbolELF>(sym));
-    
+      if (auto *d = dyn_cast<Defined>(sym))
+        if (d->size > 0 && d->section == isec)
+          symbols.emplace_back(std::make_unique<BPSymbolELF>(sym));
+
     return symbols;
   }
 

``````````

</details>


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


More information about the llvm-commits mailing list