[lld] [LLD][RISCV] Report error for unsatisfiable RISCV_ALIGN (PR #74121)

via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 1 10:09:20 PST 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 9584f5834499e6093797d4a28fde209f927ea556 052435473407dda77a423a909a84d4a4faa52959 -- 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 4356001861..612fedd9b7 100644
--- a/lld/ELF/Arch/RISCV.cpp
+++ b/lld/ELF/Arch/RISCV.cpp
@@ -688,10 +688,10 @@ static bool relax(InputSection &sec) {
       remove = nextLoc - ((loc + align - 1) & -align);
       // If we can't satisfy this alignment, we've found a bad input.
       if (LLVM_UNLIKELY(static_cast<int32_t>(remove) < 0)) {
-        error(getErrorLocation((const uint8_t*)loc) +
-              "insufficient padding bytes for " + lld::toString(r.type) +
-              ": " + Twine(r.addend) + " bytes available "
-              + "for requested alignment of " + Twine(align) + " bytes");
+        error(getErrorLocation((const uint8_t *)loc) +
+              "insufficient padding bytes for " + lld::toString(r.type) + ": " +
+              Twine(r.addend) + " bytes available " +
+              "for requested alignment of " + Twine(align) + " bytes");
         remove = 0;
       }
       break;

``````````

</details>


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


More information about the llvm-commits mailing list