[lld] Improve readability of "undefined reference" message (PR #82671)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 22 10:24:27 PST 2024
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 54a6cf15069e7e88125477e0b3ce1ab063c893c6 023cf559b06a111b9683129fe3f5d112a0dbea70 -- lld/ELF/Writer.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index cf88252962..a9292b3b1a 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -2057,8 +2057,8 @@ template <class ELFT> void Writer<ELFT>::finalizeSections() {
if (sym->dsoDefined)
continue;
if (sym->isUndefined() && !sym->isWeak()) {
- diagnose("undefined reference: " +
- toString(*sym) + "\n>>> referenced by " + toString(file) +
+ diagnose("undefined reference: " + toString(*sym) +
+ "\n>>> referenced by " + toString(file) +
" (disallowed by --no-allow-shlib-undefined)");
} else if (sym->isDefined() && sym->computeBinding() == STB_LOCAL) {
diagnose("non-exported symbol '" + toString(*sym) + "' in '" +
``````````
</details>
https://github.com/llvm/llvm-project/pull/82671
More information about the llvm-commits
mailing list