Skip to content

Commit 5491f05

Browse files
committed
Use llvm::any_of
1 parent 8837679 commit 5491f05

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1758,20 +1758,16 @@ static std::string GetSDKPathFromDebugInfo(std::string m_description,
17581758
/// All this *really* means is that it couldn't be loaded through any
17591759
/// other mechanism.
17601760
static bool IsDWARFImported(swift::ModuleDecl &module) {
1761-
return std::any_of(module.getFiles().begin(), module.getFiles().end(),
1762-
[](swift::FileUnit *file_unit) {
1763-
return (file_unit->getKind() ==
1764-
swift::FileUnitKind::DWARFModule);
1765-
});
1761+
return llvm::any_of(module.getFiles(), [](swift::FileUnit *file_unit) {
1762+
return (file_unit->getKind() == swift::FileUnitKind::DWARFModule);
1763+
});
17661764
}
17671765

17681766
/// Detect whether this is a proper Swift module.
17691767
static bool IsSerializedAST(swift::ModuleDecl &module) {
1770-
return std::any_of(module.getFiles().begin(), module.getFiles().end(),
1771-
[](swift::FileUnit *file_unit) {
1772-
return (file_unit->getKind() ==
1773-
swift::FileUnitKind::SerializedAST);
1774-
});
1768+
return llvm::any_of(module.getFiles(), [](swift::FileUnit *file_unit) {
1769+
return (file_unit->getKind() == swift::FileUnitKind::SerializedAST);
1770+
});
17751771
}
17761772

17771773

0 commit comments

Comments
 (0)