summaryrefslogtreecommitdiff
path: root/source/slang/slang-ir-insert-debug-value-store.h
diff options
context:
space:
mode:
authorCopilot <198982749+Copilot@users.noreply.github.com>2025-07-18 11:24:06 -0700
committerGitHub <noreply@github.com>2025-07-18 18:24:06 +0000
commit70273599e2bb8a8e2b0f7b5e7ad47fe2f00b2b40 (patch)
tree29d18f4b20c00bfbe684978d35d02da77713a4ae /source/slang/slang-ir-insert-debug-value-store.h
parentc901338e3b443be4c72308f4f473892404b73268 (diff)
Fix debug info generation for let variables in SPIR-V output (#7743)
* Initial plan * Fix debug info for let variables Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com> * Fix parameter count for emitDebugVar function call Fixed regression where let variable debug info generation was missing the optional argIndex parameter in emitDebugVar call. Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com> * Add location validity check for debug info generation Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com> * Don't insert debug value for nondebuggable types. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com> Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'source/slang/slang-ir-insert-debug-value-store.h')
-rw-r--r--source/slang/slang-ir-insert-debug-value-store.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/source/slang/slang-ir-insert-debug-value-store.h b/source/slang/slang-ir-insert-debug-value-store.h
index 3067c8cdd..0dc289b2e 100644
--- a/source/slang/slang-ir-insert-debug-value-store.h
+++ b/source/slang/slang-ir-insert-debug-value-store.h
@@ -1,10 +1,24 @@
#ifndef SLANG_IR_INSERT_DEBUG_VALUE_STORE_H
#define SLANG_IR_INSERT_DEBUG_VALUE_STORE_H
+#include "core/slang-basic.h"
+
namespace Slang
{
struct IRModule;
-void insertDebugValueStore(IRModule* module);
+struct IRType;
+struct IRFunc;
+struct IRInst;
+
+struct DebugValueStoreContext
+{
+ Dictionary<IRType*, bool> m_mapTypeToDebugability;
+ bool isDebuggableType(IRType* type);
+ void insertDebugValueStore(IRFunc* func);
+ bool isTypeKind(IRInst* inst);
+};
+void insertDebugValueStore(DebugValueStoreContext& context, IRModule* module);
+
} // namespace Slang
#endif // SLANG_IR_INSERT_DEBUG_VALUE_STORE_H