Home | History | Annotate | Download | only in X86
      1 ; RUN: llc -filetype=obj -use-unknown-locations=Enable -mtriple=x86_64-unknown-linux %s -o %t
      2 ; RUN: llvm-dwarfdump -debug-line %t | FileCheck %s
      3 
      4 define void @_Z3bazv() !dbg !6 {
      5   call void @_Z3foov(), !dbg !9
      6   call void @_Z3foov() ; no !dbg, so will be marked as line 0
      7   ret void, !dbg !11
      8 }
      9 
     10 declare void @_Z3foov()
     11 
     12 !llvm.dbg.cu = !{!0}
     13 !llvm.module.flags = !{!3, !4}
     14 !llvm.ident = !{!5}
     15 
     16 !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.9.0 (trunk 267219)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
     17 !1 = !DIFile(filename: "test.cc", directory: ".")
     18 !2 = !{}
     19 !3 = !{i32 2, !"Dwarf Version", i32 4}
     20 !4 = !{i32 2, !"Debug Info Version", i32 3}
     21 !5 = !{!"clang version 3.9.0 (trunk 267219)"}
     22 !6 = distinct !DISubprogram(name: "baz", linkageName: "_Z3bazv", scope: !1, file: !1, line: 3, type: !7, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)
     23 !7 = !DISubroutineType(types: !8)
     24 !8 = !{null}
     25 !9 = !DILocation(line: 4, column: 3, scope: !10)
     26 !10 = !DILexicalBlockFile(scope: !6, file: !1, discriminator: 1)
     27 !11 = !DILocation(line: 6, column: 1, scope: !6)
     28 
     29 ; Look at the lengths. We can't verify the line-number-program size
     30 ; directly, but the difference in the two lengths should not change
     31 ; unexpectedly.
     32 ; CHECK:    total_length: 0x00000044
     33 ; CHECK: prologue_length: 0x0000001f
     34 ;
     35 ; Verify that we see a line entry with a discriminator, and the next entry
     36 ; has line 0 and no discriminator.
     37 ;             line column file ISA discriminator
     38 ; CHECK:      4    3      1    0   1
     39 ; CHECK-NEXT: 0    3      1    0   0
     40