projects
/
platform
/
upstream
/
SPIRV-Tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f9903c8
)
Avoid accessing invalid iterator.
author
Dejan Mircevski
<deki@google.com>
Sat, 4 Jun 2016 01:46:19 +0000
(21:46 -0400)
committer
Dejan Mircevski
<deki@google.com>
Sat, 4 Jun 2016 01:46:19 +0000
(21:46 -0400)
source/validate_cfg.cpp
patch
|
blob
|
history
diff --git
a/source/validate_cfg.cpp
b/source/validate_cfg.cpp
index
f9a1d90
..
e1f1191
100644
(file)
--- a/
source/validate_cfg.cpp
+++ b/
source/validate_cfg.cpp
@@
-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;