1; RUN: opt %s -S -passes=declare-to-assign -o - | FileCheck %s 2; RUN: opt --try-experimental-debuginfo-iterators %s -S -passes=declare-to-assign -o - | FileCheck %s 3 4; CHECK: #dbg_assign 5 6define dso_local void @f() sanitize_hwaddress !dbg !9 { 7entry: 8 %a = alloca i32, align 4 9 call void @llvm.dbg.declare(metadata ptr %a, metadata !13, metadata !DIExpression()), !dbg !16 10 ret void, !dbg !17 11} 12 13declare void @llvm.dbg.declare(metadata, metadata, metadata) 14 15!llvm.dbg.cu = !{!0} 16!llvm.module.flags = !{!2, !3, !4, !5, !6, !7} 17!llvm.ident = !{!8} 18 19!0 = distinct !DICompileUnit(language: DW_LANG_C11, file: !1, producer: "clang version 17.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None) 20!1 = !DIFile(filename: "test.c", directory: "/") 21!2 = !{i32 7, !"Dwarf Version", i32 5} 22!3 = !{i32 2, !"Debug Info Version", i32 3} 23!4 = !{i32 1, !"wchar_size", i32 4} 24!5 = !{i32 8, !"PIC Level", i32 2} 25!6 = !{i32 7, !"PIE Level", i32 2} 26!7 = !{i32 7, !"uwtable", i32 2} 27!8 = !{!"clang version 17.0.0"} 28!9 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 1, type: !10, scopeLine: 1, flags: DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !12) 29!10 = !DISubroutineType(types: !11) 30!11 = !{null} 31!12 = !{!13} 32!13 = !DILocalVariable(name: "a", scope: !9, file: !1, line: 1, type: !14) 33!14 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) 34!15 = !DILocation(line: 1, column: 12, scope: !9) 35!16 = !DILocation(line: 1, column: 16, scope: !9) 36!17 = !DILocation(line: 1, column: 19, scope: !9) 37