Files
Vladislav Dzhidzhoev 139bcc1780 [DirectX] Generate compiler version part in llc (#199699)
This change modifies DXContainerGlobals pass to generate compiler
version (VERS) part in DXContainer.
VERS part allows consumers to information about compiler version used to
build shader.

When debug info PDB file creation will be implemented, VERS part should
go to PDB file.
2026-06-06 02:14:50 +02:00

29 lines
964 B
LLVM

; RUN: llc %s --filetype=obj -o - | obj2yaml | FileCheck %s
; CHECK: - Name: VERS
; CHECK: CompilerVersion:
; CHECK-NEXT: Major: {{[0-9]+}}
; CHECK-NEXT: Minor: {{[0-9]+}}
; CHECK-NEXT: IsDebugBuild: {{true|false}}
; CHECK-NEXT: IsValidated: false
; CHECK-NEXT: CommitCount: {{[0-9]+}}
; CHECK-NEXT: ContentSizeInBytes: {{[0-9]+}}
; CHECK-NEXT: CommitSha: {{.*}}
; CHECK-NEXT: CustomVersionString: {{.*}}
target triple = "dxilv1.3-pc-shadermodel6.3-library"
define float @_Z3fooff(float %a, float %b) {
entry:
%add = fadd float %a, %b
ret float %add
}
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!2, !3}
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, emissionKind: FullDebug)
!1 = !DIFile(filename: "dx-source-metadata.hlsl", directory: "C:\\")
!2 = !{i32 2, !"Dwarf Version", i32 4}
!3 = !{i32 2, !"Debug Info Version", i32 3}