mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-10-24 09:50:51 +00:00
Updated spirv-tools.
This commit is contained in:
13
3rdparty/spirv-tools/source/opt/function.cpp
vendored
13
3rdparty/spirv-tools/source/opt/function.cpp
vendored
@@ -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_) {
|
||||
|
||||
Reference in New Issue
Block a user