[all-commits] [llvm/llvm-project] 63c926: [Clang][HLSL][DebugInfo] Emit dx.source metadata n...

Vladislav Dzhidzhoev via All-commits all-commits at lists.llvm.org
Mon Jun 15 04:40:54 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 63c9264c770b4ffb7b5b3816547db45969026c3f
      https://github.com/llvm/llvm-project/commit/63c9264c770b4ffb7b5b3816547db45969026c3f
  Author: Vladislav Dzhidzhoev <vdzhidzhoev at accesssoftek.com>
  Date:   2026-06-15 (Mon, 15 Jun 2026)

  Changed paths:
    M clang/include/clang/Basic/CodeGenOptions.def
    M clang/include/clang/Basic/CodeGenOptions.h
    M clang/include/clang/Basic/DiagnosticDriverKinds.td
    M clang/include/clang/Basic/DiagnosticFrontendKinds.td
    M clang/include/clang/Driver/CommonArgs.h
    M clang/include/clang/Options/OptionUtils.h
    M clang/include/clang/Options/Options.td
    M clang/lib/CodeGen/CGHLSLRuntime.cpp
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/lib/Driver/ToolChains/CommonArgs.cpp
    M clang/lib/Driver/ToolChains/Flang.cpp
    M clang/lib/Frontend/CompilerInvocation.cpp
    M clang/lib/Options/OptionUtils.cpp
    A clang/test/CodeGenHLSL/Inputs/a.hlsl
    A clang/test/CodeGenHLSL/Inputs/b.hlsl
    A clang/test/CodeGenHLSL/SysInputs/c.hlsl
    M clang/test/CodeGenHLSL/debug/source-language.hlsl
    A clang/test/CodeGenHLSL/dx-source-metadata-disabled.hlsl
    A clang/test/CodeGenHLSL/dx-source-metadata-includes.hlsl
    A clang/test/CodeGenHLSL/dx-source-metadata-mailformed-command-line.hlsl
    A clang/test/CodeGenHLSL/dx-source-metadata.hlsl
    M clang/test/CodeGenHLSL/lit.local.cfg
    M clang/test/Driver/dxc_debug.hlsl
    M clang/unittests/Driver/CMakeLists.txt
    A clang/unittests/Driver/EscapedCommandLineTest.cpp

  Log Message:
  -----------
  [Clang][HLSL][DebugInfo] Emit dx.source metadata nodes (#199689)

Add HLSL debug metadata emission for DXIL by embedding non-system source
files (including included headers) into dx.source.contents, recording
the main file name and user defines, and serializing the dxc-style
command line into dx.source.args.

These metadata nodes are needed for emitting SRCI part of a debug
DXContainer in llc.

Introduce -fdx-record-command-line option to cc1 to carry the escaped
dxc driver command line into cc1.
Introduce -fdx-no-source-metadata CodeGen option to cc1, to be able to
disable dx.source metadata nodes emission. This comes in handy for
writing debug info tests, so that CHECK-NOT lines do not match
themselves in LLVM IR. For example, without this option, in
`clang/test/CodeGenHLSL/debug/source-language.hlsl`, CHECK-V4-NOT line
gets a match on the line with dx.source.contents node.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list