diff --git a/llvm/include/llvm/DWARFLinker/DWARFLinker.h b/llvm/include/llvm/DWARFLinker/DWARFLinker.h index 76ab36c33357..eaf0bbb94e34 100644 --- a/llvm/include/llvm/DWARFLinker/DWARFLinker.h +++ b/llvm/include/llvm/DWARFLinker/DWARFLinker.h @@ -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); } diff --git a/llvm/lib/DWARFLinkerParallel/DWARFLinkerImpl.h b/llvm/lib/DWARFLinkerParallel/DWARFLinkerImpl.h index 88e284f89678..a8fa9b4b46d8 100644 --- a/llvm/lib/DWARFLinkerParallel/DWARFLinkerImpl.h +++ b/llvm/lib/DWARFLinkerParallel/DWARFLinkerImpl.h @@ -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); }