[lld] [NFC] [lld] [MTE] Rename MemtagDescriptors to MemtagGlobalDescriptors (PR #77300)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 8 04:24:25 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 a831a21e4d8d41b044edaf61a90debb2ad756bda e463c850851384b0f75939243f9ad5d64455cc1e -- lld/ELF/Relocations.cpp lld/ELF/SyntheticSections.cpp lld/ELF/SyntheticSections.h lld/ELF/Writer.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp
index b0bcb6178f..1c1b0ee2f9 100644
--- a/lld/ELF/SyntheticSections.cpp
+++ b/lld/ELF/SyntheticSections.cpp
@@ -1456,7 +1456,8 @@ DynamicSection<ELFT>::computeContents() {
addInt(DT_AARCH64_MEMTAG_STACK, config->androidMemtagStack);
if (mainPart->memtagGlobalDescriptors->isNeeded()) {
addInSec(DT_AARCH64_MEMTAG_GLOBALS, *mainPart->memtagGlobalDescriptors);
- addInt(DT_AARCH64_MEMTAG_GLOBALSSZ, mainPart->memtagGlobalDescriptors->getSize());
+ addInt(DT_AARCH64_MEMTAG_GLOBALSSZ,
+ mainPart->memtagGlobalDescriptors->getSize());
}
}
}
@@ -3919,8 +3920,9 @@ static size_t computeOrWriteULEB128(uint64_t v, uint8_t *buf, size_t offset) {
// https://github.com/ARM-software/abi-aa/blob/main/memtagabielf64/memtagabielf64.rst#83encoding-of-sht_aarch64_memtag_globals_dynamic
constexpr uint64_t kMemtagStepSizeBits = 3;
constexpr uint64_t kMemtagGranuleSize = 16;
-static size_t createMemtagGlobalDescriptors(const SmallVector<const Symbol *, 0> &symbols,
- uint8_t *buf = nullptr) {
+static size_t
+createMemtagGlobalDescriptors(const SmallVector<const Symbol *, 0> &symbols,
+ uint8_t *buf = nullptr) {
size_t sectionSize = 0;
uint64_t lastGlobalEnd = 0;
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index 9cb98d5b51..dfec5e0730 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -405,7 +405,8 @@ template <class ELFT> void elf::createSyntheticSections() {
part.memtagAndroidNote = std::make_unique<MemtagAndroidNote>();
add(*part.memtagAndroidNote);
if (canHaveMemtagGlobals()) {
- part.memtagGlobalDescriptors = std::make_unique<MemtagGlobalDescriptors>();
+ part.memtagGlobalDescriptors =
+ std::make_unique<MemtagGlobalDescriptors>();
add(*part.memtagGlobalDescriptors);
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/77300
More information about the llvm-commits
mailing list