[llvm] Use llvm::is_contained (NFC)

This commit is contained in:
Kazu Hirata 2023-06-22 23:45:50 -07:00
parent fbb5f73371
commit fdd5f695fc
2 changed files with 2 additions and 4 deletions

View File

@ -359,8 +359,7 @@ public:
/// Add kind of accelerator tables to be generated.
void addAccelTableKind(AccelTableKind Kind) {
assert(std::find(Options.AccelTables.begin(), Options.AccelTables.end(),
Kind) == Options.AccelTables.end());
assert(!llvm::is_contained(Options.AccelTables, Kind));
Options.AccelTables.emplace_back(Kind);
}

View File

@ -99,8 +99,7 @@ public:
/// Add kind of accelerator tables to be generated.
void addAccelTableKind(AccelTableKind Kind) override {
assert(std::find(Options.AccelTables.begin(), Options.AccelTables.end(),
Kind) == Options.AccelTables.end());
assert(!llvm::is_contained(Options.AccelTables, Kind));
Options.AccelTables.emplace_back(Kind);
}