Skip to content

Commit 2aa53b0

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 f3c2a40 commit 2aa53b0

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
@@ -2792,10 +2792,8 @@ static void readSecurityNotes(Ctx &ctx) {
27922792
referenceFileName = (*it)->getName();
27932793
}
27942794
}
2795-
bool hasValidPauthAbiCoreInfo =
2796-
(!ctx.aarch64PauthAbiCoreInfo.empty() &&
2797-
llvm::any_of(ctx.aarch64PauthAbiCoreInfo,
2798-
[](uint8_t c) { return c != 0; }));
2795+
bool hasValidPauthAbiCoreInfo = llvm::any_of(
2796+
ctx.aarch64PauthAbiCoreInfo, [](uint8_t c) { return c != 0; });
27992797

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

0 commit comments

Comments
 (0)