[lld] Enough LLD changes to bootstrap OpenBSD on sparc64 (PR #207609)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 5 12:53:19 PDT 2026
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 origin/main HEAD --extensions cpp,h -- lld/ELF/Arch/SPARCV9.cpp lld/ELF/Driver.cpp lld/ELF/InputSection.cpp lld/ELF/Relocations.cpp lld/ELF/Relocations.h lld/ELF/Symbols.cpp lld/ELF/Symbols.h lld/ELF/SyntheticSections.cpp lld/ELF/Target.cpp lld/ELF/Target.h lld/ELF/Writer.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lld/ELF/Arch/SPARCV9.cpp b/lld/ELF/Arch/SPARCV9.cpp
index 1847fb295..25ab1279c 100644
--- a/lld/ELF/Arch/SPARCV9.cpp
+++ b/lld/ELF/Arch/SPARCV9.cpp
@@ -326,8 +326,7 @@ void SPARCV9::relocate(uint8_t *loc, const Relocation &rel,
case R_SPARC_WDISP16:
// V-d2/disp14
checkIntUInt(ctx, loc, val, 18, rel);
- write32be(loc, (read32be(loc) & ~0x0303fff) |
- (((val >> 2) & 0xc000) << 6) |
+ write32be(loc, (read32be(loc) & ~0x0303fff) | (((val >> 2) & 0xc000) << 6) |
((val >> 2) & 0x00003fff));
break;
case R_SPARC_WDISP19:
diff --git a/lld/ELF/Relocations.cpp b/lld/ELF/Relocations.cpp
index cd8d3634e..c0c11b0b8 100644
--- a/lld/ELF/Relocations.cpp
+++ b/lld/ELF/Relocations.cpp
@@ -754,8 +754,8 @@ static void addPltEntry(Ctx &ctx, PltSection &plt, GotPltSection &gotPlt,
rel.addReloc({type, &gotPlt, sym.getGotPltOffset(ctx), sym.isPreemptible,
sym, 0, expr});
} else {
- rel.addReloc({type, &plt, sym.getPltOffset(ctx), sym.isPreemptible, sym, 0,
- expr});
+ rel.addReloc(
+ {type, &plt, sym.getPltOffset(ctx), sym.isPreemptible, sym, 0, expr});
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/207609
More information about the llvm-commits
mailing list