[PATCH] D30982: [ELF] - REmove virtual methods from linker script class.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 15 07:24:30 PDT 2017


grimar created this revision.

Patch uses idea of https://reviews.llvm.org/D30939 to split In struct into 2 parts,
one templated and one non-templated.

That allows to detemplate a lot of things. Patch demostrates how
that helpfull to remove virtual methods from linker script class.
After that change, combine of LinkerScript and LinkerScriptBase into
single class is trivial.

To achieve that struct In was splited into Inx and In<ELFT>,
Body::getSymVA() was detemplated, including dependencies
(another get*() methods and PltSection class).

Patch demonstates that whole approach works, 
I can split it into several parts for commiting part by part:

1. Split **In** struct
2. Detemplate getVA/getGotPltVA/get*() methods.
3. Detemplate PltSection
4. Remove virtual methods from script.


https://reviews.llvm.org/D30982

Files:
  ELF/InputSection.cpp
  ELF/LinkerScript.cpp
  ELF/LinkerScript.h
  ELF/MapFile.cpp
  ELF/Relocations.cpp
  ELF/Symbols.cpp
  ELF/Symbols.h
  ELF/SyntheticSections.cpp
  ELF/SyntheticSections.h
  ELF/Target.cpp
  ELF/Thunks.cpp
  ELF/Writer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30982.91870.patch
Type: text/x-patch
Size: 31918 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170315/d649b7a5/attachment.bin>


More information about the llvm-commits mailing list