[lld] [LLD] Implement --enable-non-contiguous-regions (PR #90007)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 24 17:03:09 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 b9f2c16b50f68c978e90190f46a7c0db3f39e98c 7f94e712e95f89b510939746d27c81bca642167d -- lld/ELF/Config.h lld/ELF/Driver.cpp lld/ELF/ICF.cpp lld/ELF/InputSection.cpp lld/ELF/InputSection.h lld/ELF/LinkerScript.cpp lld/ELF/LinkerScript.h lld/ELF/OutputSections.cpp lld/ELF/OutputSections.h 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/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index 4182701586..8db8e4abc5 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -487,9 +487,10 @@ static void sortInputSections(MutableArrayRef<InputSectionBase *> vec,
}
// Compute and remember which sections the InputSectionDescription matches.
-SmallVector<InputSectionBase *, 0> LinkerScript::computeInputSections(
- const InputSectionDescription *cmd, ArrayRef<InputSectionBase *> sections,
- const OutputSection &outCmd) {
+SmallVector<InputSectionBase *, 0>
+LinkerScript::computeInputSections(const InputSectionDescription *cmd,
+ ArrayRef<InputSectionBase *> sections,
+ const OutputSection &outCmd) {
SmallVector<InputSectionBase *, 0> ret;
SmallVector<size_t, 0> indexes;
DenseSet<size_t> seen;
@@ -1126,7 +1127,7 @@ void LinkerScript::assignOffsets(OutputSection *sec) {
// It calculates and assigns the offsets for each section and also
// updates the output section size.
- DenseSet<InputSection*> spills;
+ DenseSet<InputSection *> spills;
auto §ions = cast<InputSectionDescription>(cmd)->sections;
for (InputSection *isec : sections) {
assert(isec->getParent() == sec);
diff --git a/lld/ELF/LinkerScript.h b/lld/ELF/LinkerScript.h
index 920eadfdb8..554df0ea88 100644
--- a/lld/ELF/LinkerScript.h
+++ b/lld/ELF/LinkerScript.h
@@ -289,7 +289,7 @@ class LinkerScript final {
SmallVector<InputSectionBase *, 0>
computeInputSections(const InputSectionDescription *,
ArrayRef<InputSectionBase *>,
- const OutputSection& outCmd);
+ const OutputSection &outCmd);
SmallVector<InputSectionBase *, 0> createInputSectionList(OutputSection &cmd);
@@ -321,7 +321,7 @@ class LinkerScript final {
SpillInputSection *head;
SpillInputSection *tail;
};
- llvm::DenseMap<InputSectionBase*, SpillList> spillLists;
+ llvm::DenseMap<InputSectionBase *, SpillList> spillLists;
public:
OutputDesc *createOutputSection(StringRef name, StringRef location);
``````````
</details>
https://github.com/llvm/llvm-project/pull/90007
More information about the llvm-commits
mailing list