Updated spirv-tools.

This commit is contained in:
Бранимир Караџић
2020-04-19 18:49:04 -07:00
parent 0778398f58
commit e262d3cf93
19 changed files with 240 additions and 36 deletions

View File

@@ -84,9 +84,12 @@ bool Function::WhileEachInst(const std::function<bool(Instruction*)>& f,
}
}
for (auto& di : debug_insts_in_header_) {
if (!di.WhileEachInst(f, run_on_debug_line_insts)) {
return false;
if (!debug_insts_in_header_.empty()) {
Instruction* di = &debug_insts_in_header_.front();
while (di != nullptr) {
Instruction* next_instruction = di->NextNode();
if (!di->WhileEachInst(f, run_on_debug_line_insts)) return false;
di = next_instruction;
}
}
@@ -118,9 +121,9 @@ bool Function::WhileEachInst(const std::function<bool(const Instruction*)>& f,
}
for (const auto& di : debug_insts_in_header_) {
if (!di.WhileEachInst(f, run_on_debug_line_insts)) {
if (!static_cast<const Instruction*>(&di)->WhileEachInst(
f, run_on_debug_line_insts))
return false;
}
}
for (const auto& bb : blocks_) {