mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-20 05:43:12 +01:00
Updated spirv-tools.
This commit is contained in:
17
3rdparty/spirv-tools/source/opt/function.cpp
vendored
17
3rdparty/spirv-tools/source/opt/function.cpp
vendored
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user