;--- Metadata ---
; Source file
!0 = !DIFile(filename: "example.c", directory: "/home/user/test", checksumkind: CSK_MD5, checksum: "d41d8cd98f00b204e9800998ecf8427e")

; Compile unit
!1 = distinct !DICompileUnit(language: DW_LANG_C99, file: 
!0, producer: "My Compiler", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: 
!2, retainedTypes: 
!3, nameTableKind: None)

!2 = ! { }

; Basic type: int
!3 = ! { !4 }
!4 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)

; Function type: int (int, int)
!5 = !DISubroutineType(types: 
!6)
!6 = ! { !4, !4, !4 } ; Return type is int, argument types are int, int

; Function: add
!7 = distinct !DISubprogram(name: "add", linkageName: "add", scope: 
!0, file: 
!0, line: 1, type: 
!5, scopeLine: 1, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: 
!1, retainedNodes: 
!8)

!8 = ! { !9, !10, !11 }

; Parameter: a
!9 = !DILocalVariable(name: "a", scope: 
!7, file: 
!0, line: 1, type: 
!4, arg: 1)
!10 = !DILocalVariable(name: "b", scope: 
!7, file: 
!0, line: 1, type: 
!4, arg: 2)
!11 = !DILocation(line: 1, column: 1, scope: 
!7)

;--- Code ---
define i32 @add(i32 %a, i32 %b) {
entry:
  ; Debug location for the entry block (function start)
  ; Add the two arguments
  %add = add i32 %a, %b, !dbg !11 ; Debug location for the add instruction
  ; Return the result
  ret i32 %add, !dbg !13       ; Debug location for the return instruction
}

; Debug locations for instructions
!12 = !DILocation(line: 2, column: 9, scope: !7) ; Line and column for the add instruction
!13 = !DILocation(line: 3, column: 5, scope: !7) ; Line and column for the return instruction
