mirror of
https://github.com/intel/llvm.git
synced 2026-01-17 14:48:27 +08:00
[lldb] Use llvm::unique (NFC) (#136527)
This commit is contained in:
@@ -642,7 +642,7 @@ void Symtab::SortSymbolIndexesByValue(std::vector<uint32_t> &indexes,
|
||||
|
||||
// Remove any duplicates if requested
|
||||
if (remove_duplicates) {
|
||||
auto last = std::unique(indexes.begin(), indexes.end());
|
||||
auto last = llvm::unique(indexes);
|
||||
indexes.erase(last, indexes.end());
|
||||
}
|
||||
}
|
||||
@@ -1151,9 +1151,7 @@ void Symtab::FindFunctionSymbols(ConstString name, uint32_t name_type_mask,
|
||||
|
||||
if (!symbol_indexes.empty()) {
|
||||
llvm::sort(symbol_indexes);
|
||||
symbol_indexes.erase(
|
||||
std::unique(symbol_indexes.begin(), symbol_indexes.end()),
|
||||
symbol_indexes.end());
|
||||
symbol_indexes.erase(llvm::unique(symbol_indexes), symbol_indexes.end());
|
||||
SymbolIndicesToSymbolContextList(symbol_indexes, sc_list);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2641,9 +2641,8 @@ Target::GetScratchTypeSystems(bool create_on_demand) {
|
||||
}
|
||||
|
||||
std::sort(scratch_type_systems.begin(), scratch_type_systems.end());
|
||||
scratch_type_systems.erase(
|
||||
std::unique(scratch_type_systems.begin(), scratch_type_systems.end()),
|
||||
scratch_type_systems.end());
|
||||
scratch_type_systems.erase(llvm::unique(scratch_type_systems),
|
||||
scratch_type_systems.end());
|
||||
return scratch_type_systems;
|
||||
}
|
||||
|
||||
|
||||
@@ -189,8 +189,7 @@ void BreakpointLocationsRequestHandler::operator()(
|
||||
// The line entries are sorted by addresses, but we must return the list
|
||||
// ordered by line / column position.
|
||||
std::sort(locations.begin(), locations.end());
|
||||
locations.erase(std::unique(locations.begin(), locations.end()),
|
||||
locations.end());
|
||||
locations.erase(llvm::unique(locations), locations.end());
|
||||
|
||||
llvm::json::Array locations_json;
|
||||
for (auto &l : locations) {
|
||||
|
||||
Reference in New Issue
Block a user