[ModuleInliner] Use SmallVector::pop_back_val (NFC)

We can use std::pop_heap first and then retrieve the top priority item
with pop_back_val, saving one line of code.
This commit is contained in:
Kazu Hirata 2023-10-18 13:04:45 -07:00
parent 400389db7d
commit 3fb3df36ea

View File

@ -255,11 +255,10 @@ public:
assert(size() > 0);
adjust();
CallBase *CB = Heap.front();
std::pop_heap(Heap.begin(), Heap.end(), isLess);
CallBase *CB = Heap.pop_back_val();
T Result = std::make_pair(CB, InlineHistoryMap[CB]);
InlineHistoryMap.erase(CB);
std::pop_heap(Heap.begin(), Heap.end(), isLess);
Heap.pop_back();
return Result;
}