Repository navigation
Conversation
Before, dxc was emitting metadata showing a language of DW_LANG_C_plus_plus Fixes microsoft#9087
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
🟡 Changes recommended
The user-visible HLSL debug-language correction is missing an entry under ### Upcoming Release in docs/ReleaseNotes.md, as required by the release-note policy.
1 open issue
What changed in this PR
Corrects HLSL debug metadata to identify compilation units as DW_LANG_HLSL rather than DW_LANG_C_plus_plus, addressing #9087.
Changes:
- Defines the HLSL language tag and permits it in debug compile-unit construction.
- Selects the HLSL tag during debug metadata generation.
- Adds a regression test checking the emitted compile-unit language.
| File | Description |
|---|---|
tools/clang/test/DXC/debug-language.hlsl |
Verifies that HLSL debug metadata uses DW_LANG_HLSL. |
tools/clang/lib/CodeGen/CGDebugInfo.cpp |
Selects the HLSL language tag for HLSL compilations. |
lib/IR/DIBuilder.cpp |
Accepts the HLSL tag in compile-unit validation. |
include/llvm/Support/Dwarf.def |
Defines DW_LANG_HLSL with value 0x0036. |
Review effort: Balanced
| if (LO.CPlusPlus) { | ||
| if (LO.ObjC1) | ||
| if (LO.HLSL) | ||
| LangTag = llvm::dwarf::DW_LANG_HLSL; |
There was a problem hiding this comment.
rj123-nv please address this one. We need a release note for this.
|
@microsoft-github-policy-service agree company="NVIDIA" |
|
DXC does not actually emit DWARF5, so using DWARF5 metadata could have some impact on downstream consumers. |
This only changes the language field in the DI metadata, since DXC doesn't emit DWARF for DXIL. Upstream Clang already emits |

Before, dxc was emitting metadata showing a language of DW_LANG_C_plus_plus
Fixes #9087