diff options
| author | Rui Ueyama <ruiu@google.com> | 2016-08-11 22:06:55 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2016-08-11 22:06:55 +0000 |
| commit | 2c3f501052dac7baa3d937d543e60662089145c7 (patch) | |
| tree | 627369ed67681a20b39332bcfa638432b73c2b09 /lld | |
| parent | 8950a53821d1b76ced7cb8cc0baf6e6292c77406 (diff) | |
| download | bcm5719-llvm-2c3f501052dac7baa3d937d543e60662089145c7.tar.gz bcm5719-llvm-2c3f501052dac7baa3d937d543e60662089145c7.zip | |
Make class hierarchy more shallow.
LayoutInputSection is a dummy class and does not need any features
that the actual implementation (InputSection class) provides.
llvm-svn: 278430
Diffstat (limited to 'lld')
| -rw-r--r-- | lld/ELF/LinkerScript.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp index 231e4f024b8..f47bba54e08 100644 --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp @@ -147,7 +147,7 @@ namespace { // keep symbol definitions in output sections. Because output sections // can contain only input sections, we wrap symbol definitions // with dummy input sections. This class serves that purpose. -template <class ELFT> class LayoutInputSection : public InputSection<ELFT> { +template <class ELFT> class LayoutInputSection : public InputSectionBase<ELFT> { public: LayoutInputSection(SymbolAssignment *Cmd); static bool classof(const InputSectionBase<ELFT> *S); @@ -194,9 +194,10 @@ template <class T> static T *zero(T *Val) { template <class ELFT> LayoutInputSection<ELFT>::LayoutInputSection(SymbolAssignment *Cmd) - : InputSection<ELFT>(nullptr, zero(&Hdr)), Cmd(Cmd) { + : InputSectionBase<ELFT>(nullptr, zero(&Hdr), + InputSectionBase<ELFT>::Layout), + Cmd(Cmd) { this->Live = true; - this->SectionKind = InputSectionBase<ELFT>::Layout; Hdr.sh_type = SHT_NOBITS; } |

