Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions lld/COFF/MapFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,9 @@ static void sortUniqueSymbols(std::vector<Defined *> &syms,

// Remove duplicate symbol pointers
parallelSort(v, std::less<SortEntry>());
auto end = std::unique(v.begin(), v.end(),
[](const SortEntry &a, const SortEntry &b) {
return a.first == b.first;
});
auto end = llvm::unique(v, [](const SortEntry &a, const SortEntry &b) {
return a.first == b.first;
});
v.erase(end, v.end());

// Sort by RVA then original order
Expand Down
12 changes: 6 additions & 6 deletions lld/ELF/AArch64ErrataFix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -461,12 +461,12 @@ void AArch64Err843419Patcher::init() {
llvm::stable_sort(mapSyms, [](const Defined *a, const Defined *b) {
return a->value < b->value;
});
mapSyms.erase(
std::unique(mapSyms.begin(), mapSyms.end(),
[=](const Defined *a, const Defined *b) {
return isCodeMapSymbol(a) == isCodeMapSymbol(b);
}),
mapSyms.end());
mapSyms.erase(llvm::unique(mapSyms,
[=](const Defined *a, const Defined *b) {
return isCodeMapSymbol(a) ==
isCodeMapSymbol(b);
}),
mapSyms.end());
// Always start with a Code Mapping Symbol.
if (!mapSyms.empty() && !isCodeMapSymbol(mapSyms.front()))
mapSyms.erase(mapSyms.begin());
Expand Down
10 changes: 5 additions & 5 deletions lld/ELF/ARMErrataFix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,11 +354,11 @@ void ARMErr657417Patcher::init() {
llvm::stable_sort(mapSyms, [](const Defined *a, const Defined *b) {
return a->value < b->value;
});
mapSyms.erase(std::unique(mapSyms.begin(), mapSyms.end(),
[=](const Defined *a, const Defined *b) {
return (isThumbMapSymbol(a) ==
isThumbMapSymbol(b));
}),
mapSyms.erase(llvm::unique(mapSyms,
[=](const Defined *a, const Defined *b) {
return (isThumbMapSymbol(a) ==
isThumbMapSymbol(b));
}),
mapSyms.end());
// Always start with a Thumb Mapping Symbol
if (!mapSyms.empty() && !isThumbMapSymbol(mapSyms.front()))
Expand Down
2 changes: 1 addition & 1 deletion lld/ELF/BPSectionOrderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ struct BPOrdererELF : lld::BPOrderer<BPOrdererELF> {
hashes.push_back(byte);

llvm::sort(hashes);
hashes.erase(std::unique(hashes.begin(), hashes.end()), hashes.end());
hashes.erase(llvm::unique(hashes), hashes.end());
}

static StringRef getSymName(const Defined &sym) { return sym.getName(); }
Expand Down
2 changes: 1 addition & 1 deletion lld/ELF/SyntheticSections.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ SmallVector<EhFrameSection::FdeData, 0> EhFrameSection::getFdeData() const {
auto eq = [](const FdeData &a, const FdeData &b) {
return a.pcRel == b.pcRel;
};
ret.erase(std::unique(ret.begin(), ret.end(), eq), ret.end());
ret.erase(llvm::unique(ret, eq), ret.end());

return ret;
}
Expand Down
2 changes: 1 addition & 1 deletion lld/MachO/BPSectionOrderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ struct BPOrdererMachO : lld::BPOrderer<BPOrdererMachO> {
}

llvm::sort(hashes);
hashes.erase(std::unique(hashes.begin(), hashes.end()), hashes.end());
hashes.erase(llvm::unique(hashes), hashes.end());
}

static llvm::StringRef getSymName(const Defined &sym) {
Expand Down
2 changes: 1 addition & 1 deletion lld/include/lld/Common/BPSectionOrdererBase.inc
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ auto BPOrderer<D>::computeOrder(
auto &uns = startupSectionIdxUNs[sectionIdx];
uns.append(compressionUns);
llvm::sort(uns);
uns.erase(std::unique(uns.begin(), uns.end()), uns.end());
uns.erase(llvm::unique(uns), uns.end());
}
}

Expand Down
Loading