<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/spirv/debug-compilation-unit-main-file.slang, branch master</title>
<subtitle>Making it easier to work with shaders</subtitle>
<id>https://git.yummers.dev/slang.git/atom?h=master</id>
<link rel='self' href='https://git.yummers.dev/slang.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/'/>
<updated>2025-09-18T17:37:14+00:00</updated>
<entry>
<title>Fix DebugCompilationUnit to reference main shader file instead of header files (#7957)</title>
<updated>2025-09-18T17:37:14+00:00</updated>
<author>
<name>Lujin Wang</name>
<email>143145775+lujinwangnv@users.noreply.github.com</email>
</author>
<published>2025-09-18T17:37:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=ed9f42361e2f07a79fde39ded9e57473d5fac39f'/>
<id>urn:sha1:ed9f42361e2f07a79fde39ded9e57473d5fac39f</id>
<content type='text'>
This PR implements the requested fix for issue #7923 where
DebugCompilationUnit incorrectly referenced header files instead of the
main shader file.

## Summary

- Modified IRDebugSource to include isIncludedFile flag as third operand
- Updated emitDebugSource function to accept and pass the included file
flag
- Updated call sites to use source-&gt;isIncludedFile() from SourceFile
class
- Modified SPIR-V emission to only create DebugCompilationUnit for
non-included files

## Test Results

The fix has been verified with the provided reproducer code. The SPIR-V
output now correctly shows DebugCompilationUnit referencing the main
shader file instead of header files.

Generated with [Claude Code](https://claude.ai/code)

---------

Co-authored-by: github-actions[bot] &lt;41898282+github-actions[bot]@users.noreply.github.com&gt;
Co-authored-by: Lujin Wang &lt;lujinwangnv@users.noreply.github.com&gt;
Co-authored-by: Claude Code &lt;claude@anthropic.com&gt;
Co-authored-by: slangbot &lt;ellieh+slangbot@nvidia.com&gt;
Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;</content>
</entry>
</feed>
