[lld] [ELF] Enhance --no-allow-shlib-undefined to report hidden definition (PR #70769)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 30 23:09:05 PDT 2023
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 a396fb247e0719f56a830a9e4aab0449be7f843a dec385e48b02d232dc3124765e6cb9da314f0cd3 -- lld/ELF/InputFiles.cpp lld/ELF/Symbols.h 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 8b9d7505bb61..9550f1972e0b 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -2032,9 +2032,8 @@ template <class ELFT> void Writer<ELFT>::finalizeSections() {
if (sym->hasFlag(HAS_SHARED_DEF))
continue;
if (sym->isUndefined() && !sym->isWeak()) {
- diagnose(
- "undefined reference due to --no-allow-shlib-undefined: " +
- toString(*sym) + "\n>>> referenced by " + toString(file));
+ diagnose("undefined reference due to --no-allow-shlib-undefined: " +
+ toString(*sym) + "\n>>> referenced by " + toString(file));
} else if (sym->isDefined() && sym->visibility() == ELF::STV_HIDDEN) {
diagnose("hidden symbol '" + toString(*sym) +
"' is referenced by DSO '" + toString(file) + "'");
``````````
</details>
https://github.com/llvm/llvm-project/pull/70769
More information about the llvm-commits
mailing list