[PATCH] D37743: [LLD][ELF] Record created ThunkSections in InputSectionDescription [NFC]

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 12 07:22:41 PDT 2017


peter.smith created this revision.
Herald added subscribers: arichardson, sdardis, emaste.

This is a refactoring change split out from https://reviews.llvm.org/D34689. It implements the suggestion to move ThunkCreator's map from std::vector<InputSection *> * to std::vector<ThunkSection *> to a vector<ThunkSection *> in InputSectionDescription. This patch implements just this refactoring. There are quite a lot of small changes involved although most are mechanical in nature. Notable changes:

- We must now iterate over the InputSectionDescription to find the new Thunks rather than iterating over the map. I've modified forEachExecInputSection to be forEachInputSectionDescription so this can be used in mergeThunks.
- We cannot clear the InputSectionDescription->ThunkSections within the forEachInputSectionDescription within createThunks as the Mips Thunks are inserted in the callee's InputSectionDescription. I've chosen to clear it after merging all the Thunks.


https://reviews.llvm.org/D37743

Files:
  ELF/LinkerScript.h
  ELF/Relocations.cpp
  ELF/Relocations.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37743.114830.patch
Type: text/x-patch
Size: 12910 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170912/d45b1cd1/attachment.bin>


More information about the llvm-commits mailing list