[llvm] [JITLink] fix i686 R_386_32 relocation value (PR #111091)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 4 10:08:30 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 f873fc3ae2afb316d69c3f9be7b8903c18f217b0 4731ac2a07cda92c5191f547a79472318d22d882 --extensions cpp,h -- llvm/include/llvm/ExecutionEngine/JITLink/i386.h llvm/lib/ExecutionEngine/JITLink/ELF_i386.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/ExecutionEngine/JITLink/i386.h b/llvm/include/llvm/ExecutionEngine/JITLink/i386.h
index c1f7b64480..bc285bc268 100644
--- a/llvm/include/llvm/ExecutionEngine/JITLink/i386.h
+++ b/llvm/include/llvm/ExecutionEngine/JITLink/i386.h
@@ -215,8 +215,7 @@ inline Error applyFixup(LinkGraph &G, Block &B, const Edge &E,
}
case i386::PCRel32: {
- int32_t Value =
- E.getTarget().getAddress() - FixupAddress + E.getAddend();
+ int32_t Value = E.getTarget().getAddress() - FixupAddress + E.getAddend();
*(little32_t *)FixupPtr = Value;
break;
}
@@ -231,8 +230,7 @@ inline Error applyFixup(LinkGraph &G, Block &B, const Edge &E,
}
case i386::PCRel16: {
- int32_t Value =
- E.getTarget().getAddress() - FixupAddress + E.getAddend();
+ int32_t Value = E.getTarget().getAddress() - FixupAddress + E.getAddend();
if (LLVM_LIKELY(isInt<16>(Value)))
*(little16_t *)FixupPtr = Value;
else
@@ -257,8 +255,7 @@ inline Error applyFixup(LinkGraph &G, Block &B, const Edge &E,
case i386::BranchPCRel32:
case i386::BranchPCRel32ToPtrJumpStub:
case i386::BranchPCRel32ToPtrJumpStubBypassable: {
- int32_t Value =
- E.getTarget().getAddress() - FixupAddress + E.getAddend();
+ int32_t Value = E.getTarget().getAddress() - FixupAddress + E.getAddend();
*(little32_t *)FixupPtr = Value;
break;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/111091
More information about the llvm-commits
mailing list