summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/ELF/OutputSections.cpp4
-rw-r--r--lld/ELF/OutputSections.h3
-rw-r--r--lld/ELF/Writer.cpp2
3 files changed, 3 insertions, 6 deletions
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp
index 06aaad7785f..d6ae5dcae16 100644
--- a/lld/ELF/OutputSections.cpp
+++ b/lld/ELF/OutputSections.cpp
@@ -155,9 +155,7 @@ static SectionKey createKey(InputSectionBase *C, StringRef OutsecName) {
return SectionKey{OutsecName, Flags, Alignment};
}
-OutputSectionFactory::OutputSectionFactory(
- std::vector<OutputSection *> &OutputSections)
- : OutputSections(OutputSections) {}
+OutputSectionFactory::OutputSectionFactory() {}
static uint64_t getIncompatibleFlags(uint64_t Flags) {
return Flags & (SHF_ALLOC | SHF_TLS);
diff --git a/lld/ELF/OutputSections.h b/lld/ELF/OutputSections.h
index 2ecb6c29969..68ee066a13d 100644
--- a/lld/ELF/OutputSections.h
+++ b/lld/ELF/OutputSections.h
@@ -131,7 +131,7 @@ namespace elf {
// linker scripts.
class OutputSectionFactory {
public:
- OutputSectionFactory(std::vector<OutputSection *> &OutputSections);
+ OutputSectionFactory();
~OutputSectionFactory();
void addInputSec(InputSectionBase *IS, StringRef OutsecName);
@@ -140,7 +140,6 @@ public:
private:
llvm::SmallDenseMap<SectionKey, OutputSection *> Map;
- std::vector<OutputSection *> &OutputSections;
};
uint64_t getHeaderSize();
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index 6828dba1ea6..b6f79fd785a 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -73,7 +73,7 @@ private:
std::unique_ptr<FileOutputBuffer> Buffer;
- OutputSectionFactory Factory{OutputSections};
+ OutputSectionFactory Factory;
void addRelIpltSymbols();
void addStartEndSymbols();
OpenPOWER on IntegriCloud