Skip to content

Commit 02a1fa7

Browse files
committed
change SmallVector to SmallVectorImpl
1 parent 534e55e commit 02a1fa7

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

lld/ELF/InputFiles.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,13 @@ static void updateSupportedARMFeatures(Ctx &ctx,
213213
}
214214

215215
// Sanitize pauth values.
216-
// Ensure that pauthSubSection is either std::nullopt or contains exactly two build attributes: ID and Scheme.
216+
// Ensure that pauthSubSection is either std::nullopt or contains exactly two
217+
// build attributes: ID and Scheme.
217218
// - Content[0]: ID, Content[1]: Scheme.
218219
// - Remove build attributes with unknown tags.
219220
// - Set pauthSubSection to std::nullopt if any required attributes are missing.
220-
// - Sort the content vector so that ID is at Content[0] and Scheme at Content[1].
221+
// - Sort the content vector so that ID is at Content[0] and Scheme at
222+
// Content[1].
221223
static void sanitizePauthSubSection(
222224
Ctx &ctx, std::optional<llvm::BuildAttributeSubSection> &pauthSubSection,
223225
InputSection isec) {
@@ -265,11 +267,13 @@ static void sanitizePauthSubSection(
265267
}
266268

267269
// Sanitize feature bits.
268-
// Ensure that fAndBSubSection always contains exactly three build attributes: BTI, PAC, and GCS.
270+
// Ensure that fAndBSubSection always contains exactly three build attributes:
271+
// BTI, PAC, and GCS.
269272
// - Content[0]: BTI, Content[1]: PAC, Content[2]: GCS.
270273
// - Remove build attributes with unknown tags.
271274
// - If any attribute is missing, add it with its value set to `0`.
272-
// - Sort the content vector so that Content[0] is BTI, Content[1] is PAC, and Content[2] is GCS.
275+
// - Sort the content vector so that Content[0] is BTI, Content[1] is PAC, and
276+
// Content[2] is GCS.
273277
static void sanitizeFAndBSubSection(
274278
std::optional<llvm::BuildAttributeSubSection> &fAndBSubSection) {
275279
/*
@@ -314,7 +318,7 @@ static void sanitizeFAndBSubSection(
314318
static std::array<std::optional<llvm::BuildAttributeSubSection>, 2>
315319
extractBuildAttributesSubsection(
316320
Ctx &ctx,
317-
const SmallVector<llvm::BuildAttributeSubSection, 8>
321+
const SmallVectorImpl<llvm::BuildAttributeSubSection>
318322
&buildAttributesSubsections,
319323
InputSection isec) {
320324

0 commit comments

Comments
 (0)