@@ -203,20 +203,20 @@ class InputSectionDescription : public SectionCommand {
203
203
204
204
// Input sections that matches at least one of SectionPatterns
205
205
// will be associated with this InputSectionDescription.
206
- std::vector <SectionPattern> sectionPatterns;
206
+ SmallVector <SectionPattern, 0 > sectionPatterns;
207
207
208
208
// Includes InputSections and MergeInputSections. Used temporarily during
209
209
// assignment of input sections to output sections.
210
- std::vector <InputSectionBase *> sectionBases;
210
+ SmallVector <InputSectionBase *, 0 > sectionBases;
211
211
212
212
// Used after the finalizeInputSections() pass. MergeInputSections have been
213
213
// merged into MergeSyntheticSections.
214
- std::vector <InputSection *> sections;
214
+ SmallVector <InputSection *, 0 > sections;
215
215
216
216
// Temporary record of synthetic ThunkSection instances and the pass that
217
217
// they were created in. This is used to insert newly created ThunkSections
218
218
// into Sections at the end of a createThunks() pass.
219
- std::vector <std::pair<ThunkSection *, uint32_t >> thunkSections;
219
+ SmallVector <std::pair<ThunkSection *, uint32_t >, 0 > thunkSections;
220
220
221
221
// SectionPatterns can be filtered with the INPUT_SECTION_FLAGS command.
222
222
uint64_t withFlags;
@@ -279,11 +279,11 @@ class LinkerScript final {
279
279
void expandOutputSection (uint64_t size);
280
280
void expandMemoryRegions (uint64_t size);
281
281
282
- std::vector <InputSectionBase *>
282
+ SmallVector <InputSectionBase *, 0 >
283
283
computeInputSections (const InputSectionDescription *,
284
284
ArrayRef<InputSectionBase *>);
285
285
286
- std::vector <InputSectionBase *> createInputSectionList (OutputSection &cmd);
286
+ SmallVector <InputSectionBase *, 0 > createInputSectionList (OutputSection &cmd);
287
287
288
288
void discardSynthetic (OutputSection &);
289
289
@@ -347,23 +347,23 @@ class LinkerScript final {
347
347
348
348
// List of section patterns specified with KEEP commands. They will
349
349
// be kept even if they are unused and --gc-sections is specified.
350
- std::vector <InputSectionDescription *> keptSections;
350
+ SmallVector <InputSectionDescription *, 0 > keptSections;
351
351
352
352
// A map from memory region name to a memory region descriptor.
353
353
llvm::MapVector<llvm::StringRef, MemoryRegion *> memoryRegions;
354
354
355
355
// A list of symbols referenced by the script.
356
- std::vector <llvm::StringRef> referencedSymbols;
356
+ SmallVector <llvm::StringRef, 0 > referencedSymbols;
357
357
358
358
// Used to implement INSERT [AFTER|BEFORE]. Contains output sections that need
359
359
// to be reordered.
360
- std::vector <InsertCommand> insertCommands;
360
+ SmallVector <InsertCommand, 0 > insertCommands;
361
361
362
362
// OutputSections specified by OVERWRITE_SECTIONS.
363
- std::vector <OutputSection *> overwriteSections;
363
+ SmallVector <OutputSection *, 0 > overwriteSections;
364
364
365
365
// Sections that will be warned/errored by --orphan-handling.
366
- std::vector <const InputSectionBase *> orphanSections;
366
+ SmallVector <const InputSectionBase *, 0 > orphanSections;
367
367
};
368
368
369
369
extern std::unique_ptr<LinkerScript> script;
0 commit comments