[llvm] [Bolt] Fix issue 110407 (Support CREL) (PR #119150)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 18 04:24:22 PST 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 eff0d8103c5e0db938550dd6e18230ea8ed9ff4b e76d7498b2d85eb555a09e6b08b1b48c865df1ce --extensions cpp -- bolt/lib/Rewrite/RewriteInstance.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/bolt/lib/Rewrite/RewriteInstance.cpp b/bolt/lib/Rewrite/RewriteInstance.cpp
index f1ef97888a..10dc1c66fc 100644
--- a/bolt/lib/Rewrite/RewriteInstance.cpp
+++ b/bolt/lib/Rewrite/RewriteInstance.cpp
@@ -1939,9 +1939,11 @@ Error RewriteInstance::readSpecialSections() {
}
const char *code_sec = BC->getMainCodeSectionName();
- HasTextRelocations = !!BC->getUniqueSectionByName(std::string{".rela"} + code_sec);
+ HasTextRelocations =
+ !!BC->getUniqueSectionByName(std::string{".rela"} + code_sec);
if (!HasTextRelocations)
- HasTextRelocations = !!BC->getUniqueSectionByName(std::string{".crel"} + code_sec);
+ HasTextRelocations =
+ !!BC->getUniqueSectionByName(std::string{".crel"} + code_sec);
HasSymbolTable = (bool)BC->getUniqueSectionByName(".symtab");
EHFrameSection = BC->getUniqueSectionByName(".eh_frame");
@@ -2133,7 +2135,7 @@ int64_t getRelocationAddend(const ELFObjectFile<ELFT> *Obj,
case ELF::SHT_CREL: {
auto ERela = Obj->getCrel(Rel);
Addend = ERela.r_addend;
- break;
+ break;
}
case ELF::SHT_RELA: {
const Elf_Rela *RelA = Obj->getRela(Rel);
``````````
</details>
https://github.com/llvm/llvm-project/pull/119150
More information about the llvm-commits
mailing list