[lld] [LLD][RISCV] Warn on PCREL_LO referencing other Section (PR #107558)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 6 03:36:31 PDT 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 a424b792053a48ef7e00636f28f3cc8faa23d637 e6346f69fad36a1e2b2a7ec03251a5c738d189b7 --extensions cpp -- lld/ELF/Arch/RISCV.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lld/ELF/Arch/RISCV.cpp b/lld/ELF/Arch/RISCV.cpp
index 80a7909c42..2351e24f1e 100644
--- a/lld/ELF/Arch/RISCV.cpp
+++ b/lld/ELF/Arch/RISCV.cpp
@@ -675,9 +675,9 @@ void RISCV::relocateAlloc(InputSectionBase &sec, uint8_t *buf) const {
if (Defined *def = dyn_cast<Defined>(rel.sym);
def->section && def->section != &sec) {
errorOrWarn(sec.getLocation(rel.offset) +
- ": R_RISCV_PCREL_LO12 relocation points to a symbol '" +
- rel.sym->getName() + "' in a different section '" +
- def->section->name + "'");
+ ": R_RISCV_PCREL_LO12 relocation points to a symbol '" +
+ rel.sym->getName() + "' in a different section '" +
+ def->section->name + "'");
}
break;
default:
``````````
</details>
https://github.com/llvm/llvm-project/pull/107558
More information about the llvm-commits
mailing list