Skip to content

Commit 35d5c86

Browse files
committed
Omit unneeded !ctx.aarch64PauthAbiCoreInfo.empty() check
With `llvm::any_of(ctx.aarch64PauthAbiCoreInfo, /*...*/)` being true, the byte range is always non-empty.
1 parent 5420db8 commit 35d5c86

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lld/ELF/Driver.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2753,10 +2753,8 @@ static void readSecurityNotes(Ctx &ctx) {
27532753
referenceFileName = (*it)->getName();
27542754
}
27552755
}
2756-
bool hasValidPauthAbiCoreInfo =
2757-
(!ctx.aarch64PauthAbiCoreInfo.empty() &&
2758-
llvm::any_of(ctx.aarch64PauthAbiCoreInfo,
2759-
[](uint8_t c) { return c != 0; }));
2756+
bool hasValidPauthAbiCoreInfo = llvm::any_of(
2757+
ctx.aarch64PauthAbiCoreInfo, [](uint8_t c) { return c != 0; });
27602758

27612759
for (ELFFileBase *f : ctx.objectFiles) {
27622760
uint32_t features = f->andFeatures;

0 commit comments

Comments
 (0)