Updated spirv-tools.

This commit is contained in:
Бранимир Караџић
2020-03-28 16:25:06 -07:00
parent eff6f13011
commit f334d0c1cb
15 changed files with 377 additions and 43 deletions

View File

@@ -34,6 +34,11 @@ Function* Function::Clone(IRContext* ctx) const {
},
true);
for (const auto& i : debug_insts_in_header_) {
clone->AddDebugInstructionInHeader(
std::unique_ptr<Instruction>(i.Clone(ctx)));
}
clone->blocks_.reserve(blocks_.size());
for (const auto& b : blocks_) {
std::unique_ptr<BasicBlock> bb(b->Clone(ctx));
@@ -79,6 +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;
}
}
for (auto& bb : blocks_) {
if (!bb->WhileEachInst(f, run_on_debug_line_insts)) {
return false;
@@ -106,6 +117,12 @@ 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)) {
return false;
}
}
for (const auto& bb : blocks_) {
if (!static_cast<const BasicBlock*>(bb.get())->WhileEachInst(
f, run_on_debug_line_insts)) {