From 73a61edda8893901acad05bb4e7d3110db5041a8 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 28 Feb 2024 22:57:07 -0800 Subject: [SPIRV] Add NonSemanticDebugInfo for step-through debugging. (#3644) * [SPIRV] Add NonSemanticDebugInfo for step-through debugging. * Fix. * Fix. --- source/slang/slang-legalize-types.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'source/slang/slang-legalize-types.cpp') diff --git a/source/slang/slang-legalize-types.cpp b/source/slang/slang-legalize-types.cpp index 8ed5a12b7..c8a840ce9 100644 --- a/source/slang/slang-legalize-types.cpp +++ b/source/slang/slang-legalize-types.cpp @@ -2,6 +2,7 @@ #include "slang-legalize-types.h" #include "slang-ir-insts.h" +#include "slang-ir-util.h" #include "slang-mangle.h" namespace Slang @@ -447,11 +448,7 @@ struct TupleTypeBuilder IRBuilder* builder = context->getBuilder(); IRStructType* ordinaryStructType = builder->createStructType(); ordinaryStructType->sourceLoc = originalStructType->sourceLoc; - - if(auto nameHintDecoration = originalStructType->findDecoration()) - { - builder->addNameHintDecoration(ordinaryStructType, nameHintDecoration->getNameOperand()); - } + copyNameHintAndDebugDecorations(ordinaryStructType, originalStructType); // The new struct type will appear right after the original in the IR, // so that we can be sure any instruction that could reference the -- cgit v1.2.3