diff options
author | Fangrui Song <i@maskray.me> | 2021-12-16 20:50:06 -0800 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2021-12-16 20:50:06 -0800 |
commit | 93558e575e922e427cde242992569106de9fe256 (patch) | |
tree | 67256af383922dcf3336aa3589af2f734cc33238 /lld/ELF/SyntheticSections.cpp | |
parent | 2444e305c5fe83c48e5506313ab9d9cec790701f (diff) | |
download | llvm-93558e575e922e427cde242992569106de9fe256.zip llvm-93558e575e922e427cde242992569106de9fe256.tar.gz llvm-93558e575e922e427cde242992569106de9fe256.tar.bz2 |
[ELF] Internalize createMergeSynthetic. NFC
Only called once. Moving to OutputSections.cpp can make it inlined.
finalizeInputSections can be very hot, especially in -O1 links with much debug info.
Diffstat (limited to 'lld/ELF/SyntheticSections.cpp')
-rw-r--r-- | lld/ELF/SyntheticSections.cpp | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp index 49b8077..95d2cd5 100644 --- a/lld/ELF/SyntheticSections.cpp +++ b/lld/ELF/SyntheticSections.cpp @@ -3313,15 +3313,6 @@ void MergeNoTailSection::finalizeContents() { }); } -MergeSyntheticSection *elf::createMergeSynthetic(StringRef name, uint32_t type, - uint64_t flags, - uint32_t alignment) { - bool shouldTailMerge = (flags & SHF_STRINGS) && config->optimize >= 2; - if (shouldTailMerge) - return make<MergeTailSection>(name, type, flags, alignment); - return make<MergeNoTailSection>(name, type, flags, alignment); -} - template <class ELFT> void elf::splitSections() { llvm::TimeTraceScope timeScope("Split sections"); // splitIntoPieces needs to be called on each MergeInputSection |