[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:
parent
400389db7d
commit
3fb3df36ea
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user