mirror of
https://github.com/xenia-project/SPIRV-Tools.git
synced 2024-11-23 11:19:41 +00:00
Avoid accessing invalid iterator.
This commit is contained in:
parent
f9903c8d36
commit
c5fe6d9dc9
@ -85,11 +85,11 @@ vector<const BasicBlock*> PostOrderSort(const BasicBlock& entry, size_t size) {
|
||||
staged.pop_back();
|
||||
} else {
|
||||
BasicBlock* child = *top.iter;
|
||||
top.iter++;
|
||||
if (processed.find(child->get_id()) == end(processed)) {
|
||||
staged.emplace_back(block_info{child, begin(child->get_successors())});
|
||||
processed.insert(child->get_id());
|
||||
}
|
||||
top.iter++;
|
||||
}
|
||||
}
|
||||
return out;
|
||||
|
Loading…
Reference in New Issue
Block a user