Updated spirv-tools.

This commit is contained in:
Бранимир Караџић
2019-03-30 21:02:17 -07:00
parent 2ddefa50b7
commit 2d6c2cebeb
35 changed files with 775 additions and 269 deletions

View File

@@ -184,6 +184,12 @@ uint32_t BasicBlock::MergeBlockIdIfAny() const {
return mbid;
}
uint32_t BasicBlock::MergeBlockId() const {
uint32_t mbid = MergeBlockIdIfAny();
assert(mbid && "Expected block to have a corresponding merge block");
return mbid;
}
uint32_t BasicBlock::ContinueBlockIdIfAny() const {
auto merge_ii = cend();
--merge_ii;
@@ -197,6 +203,12 @@ uint32_t BasicBlock::ContinueBlockIdIfAny() const {
return cbid;
}
uint32_t BasicBlock::ContinueBlockId() const {
uint32_t cbid = ContinueBlockIdIfAny();
assert(cbid && "Expected block to have a corresponding continue target");
return cbid;
}
std::ostream& operator<<(std::ostream& str, const BasicBlock& block) {
str << block.PrettyPrint();
return str;