[lld] Support --unresolved-symbols=@<file> option in LLD for ELF (PR #142917)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 5 01:09:50 PDT 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 HEAD~1 HEAD --extensions h,cpp -- lld/ELF/Config.h lld/ELF/Driver.cpp lld/ELF/Relocations.cpp
``````````

</details>

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

``````````diff
diff --git a/lld/ELF/Relocations.cpp b/lld/ELF/Relocations.cpp
index 6e87f78ca..66222a85f 100644
--- a/lld/ELF/Relocations.cpp
+++ b/lld/ELF/Relocations.cpp
@@ -805,9 +805,9 @@ static bool maybeReportUndefined(Ctx &ctx, Undefined &sym,
     return false;
 
   // Skip undefined symbols from list
-  for (const auto& ignoredUndef : ctx.arg.unresolvedSymbolsList) {
+  for (const auto &ignoredUndef : ctx.arg.unresolvedSymbolsList) {
     if (ignoredUndef == sym.getName()) {
-        return false;
+      return false;
     }
   }
 

``````````

</details>


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


More information about the llvm-commits mailing list