mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-11 13:44:28 +00:00
When a priority_queue is empty, the behavior of top() operator is
non-deterministic. Returns NULL when it's empty! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28560 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
85ede37ca9
commit
19564e3d83
@ -356,6 +356,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
SUnit *pop() {
|
SUnit *pop() {
|
||||||
|
if (empty()) return NULL;
|
||||||
SUnit *V = Queue.top();
|
SUnit *V = Queue.top();
|
||||||
Queue.pop();
|
Queue.pop();
|
||||||
return V;
|
return V;
|
||||||
|
Loading…
Reference in New Issue
Block a user