mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
[ExecutionEngine, Linker] Use erase_if (NFC)
This commit is contained in:
parent
b3956a9858
commit
eea8d75638
@ -218,11 +218,9 @@ SectionMemoryManager::applyMemoryGroupPermissions(MemoryGroup &MemGroup,
|
||||
}
|
||||
|
||||
// Remove all blocks which are now empty
|
||||
MemGroup.FreeMem.erase(remove_if(MemGroup.FreeMem,
|
||||
[](FreeMemBlock &FreeMB) {
|
||||
return FreeMB.Free.allocatedSize() == 0;
|
||||
}),
|
||||
MemGroup.FreeMem.end());
|
||||
erase_if(MemGroup.FreeMem, [](FreeMemBlock &FreeMB) {
|
||||
return FreeMB.Free.allocatedSize() == 0;
|
||||
});
|
||||
|
||||
return std::error_code();
|
||||
}
|
||||
|
@ -905,7 +905,7 @@ IRLinker::linkAppendingVarProto(GlobalVariable *DstGV,
|
||||
getArrayElements(SrcGV->getInitializer(), SrcElements);
|
||||
|
||||
if (IsNewStructor) {
|
||||
auto It = remove_if(SrcElements, [this](Constant *E) {
|
||||
erase_if(SrcElements, [this](Constant *E) {
|
||||
auto *Key =
|
||||
dyn_cast<GlobalValue>(E->getAggregateElement(2)->stripPointerCasts());
|
||||
if (!Key)
|
||||
@ -913,7 +913,6 @@ IRLinker::linkAppendingVarProto(GlobalVariable *DstGV,
|
||||
GlobalValue *DGV = getLinkedToGlobal(Key);
|
||||
return !shouldLink(DGV, *Key);
|
||||
});
|
||||
SrcElements.erase(It, SrcElements.end());
|
||||
}
|
||||
uint64_t NewSize = DstNumElements + SrcElements.size();
|
||||
ArrayType *NewType = ArrayType::get(EltTy, NewSize);
|
||||
|
Loading…
Reference in New Issue
Block a user