[tools] Use llvm::is_contained (NFC)

This commit is contained in:
Kazu Hirata 2023-06-19 23:36:14 -07:00
parent f8a4cd0f07
commit a3b9c1533e
2 changed files with 3 additions and 6 deletions

View File

@ -377,8 +377,7 @@ Error linkDebugInfoImpl(object::ObjectFile &File, const Options &Options,
if (Options.AccelTableKind == DwarfUtilAccelKind::None)
AccelTableNamesToDelete.push_back(Sec.Name);
else if (std::find(AccelTables.begin(), AccelTables.end(),
*SrcAccelTableKind) == AccelTables.end())
else if (!llvm::is_contained(AccelTables, *SrcAccelTableKind))
AccelTableNamesToReplace.push_back(Sec.Name);
} else if (!knownByDWARFUtil(Sec.Name)) {
assert(!SrcAccelTableKind);

View File

@ -242,10 +242,8 @@ bool MissingFrameInferrer::inferMissingFrames(
// Done with the inference if the calle is reachable via a single callsite.
// This may not be accurate but it improves the search throughput.
for (auto Target : CallEdgesF[From]) {
if (Target == ToFRange->Func)
return true;
}
if (llvm::is_contained(CallEdgesF[From], ToFRange->Func))
return true;
// Bail out if callee is not tailcall reachable at all.
if (!TailCallTargetFuncs.contains(ToFRange->Func))