This is a refactoring change split out from 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.