Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/opt/debug_info_manager.cpp')
-rw-r--r--source/opt/debug_info_manager.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/opt/debug_info_manager.cpp b/source/opt/debug_info_manager.cpp
index f0a78a5ff..98d98d4ff 100644
--- a/source/opt/debug_info_manager.cpp
+++ b/source/opt/debug_info_manager.cpp
@@ -564,8 +564,8 @@ bool DebugInfoManager::IsDeclareVisibleToInstr(Instruction* dbg_declare,
bool DebugInfoManager::AddDebugValueIfVarDeclIsVisible(
Instruction* scope_and_line, uint32_t variable_id, uint32_t value_id,
- Instruction* insert_pos,
- std::unordered_set<Instruction*>* invisible_decls) {
+ Instruction* insert_pos, std::unordered_set<Instruction*>* invisible_decls,
+ bool force) {
assert(scope_and_line != nullptr);
auto dbg_decl_itr = var_id_to_dbg_decl_.find(variable_id);
@@ -573,7 +573,7 @@ bool DebugInfoManager::AddDebugValueIfVarDeclIsVisible(
bool modified = false;
for (auto* dbg_decl_or_val : dbg_decl_itr->second) {
- if (!IsDeclareVisibleToInstr(dbg_decl_or_val, scope_and_line)) {
+ if (!IsDeclareVisibleToInstr(dbg_decl_or_val, scope_and_line) && !force) {
if (invisible_decls) invisible_decls->insert(dbg_decl_or_val);
continue;
}