DI: Reverse direction of subprogram -> function edge.
[oota-llvm.git] / test / DebugInfo / X86 / ghost-sdnode-dbgvalues.ll
index 9391da6da4f1aa72283256f240e7e820f8ece6d6..20bb1b3f145fc87462d37ff8707a0716efe63dce 100644 (file)
@@ -29,7 +29,7 @@
 ; when run with r221709 reverted, then it really doesn't test anything anymore.
 
 ; Function Attrs: nounwind ssp uwtable
-define i32 @foo(i32 %a) #0 {
+define i32 @foo(i32 %a) #0 !dbg !8 {
 entry:
   call void @llvm.dbg.value(metadata i32 %a, i64 0, metadata !16, metadata !17), !dbg !18
   %conv = trunc i32 %a to i16, !dbg !19
@@ -68,38 +68,38 @@ attributes #1 = { nounwind readnone }
 !llvm.module.flags = !{!13, !14}
 !llvm.ident = !{!15}
 
-!0 = !{!"0x11\0012\00clang version 3.6.0 \000\00\000\00\001", !1, !2, !3, !7, !2, !2} ; [ DW_TAG_compile_unit ] [/tmp/ghost-sdnode-dbgvalues.c] [DW_LANG_C99]
-!1 = !{!"ghost-sdnode-dbgvalues.c", !"/tmp"}
+!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.6.0 ", isOptimized: false, emissionKind: 1, file: !1, enums: !2, retainedTypes: !3, subprograms: !7, globals: !2, imports: !2)
+!1 = !DIFile(filename: "ghost-sdnode-dbgvalues.c", directory: "/tmp")
 !2 = !{}
 !3 = !{!4}
-!4 = !{!"0x16\00int16_t\0030\000\000\000\000", !5, null, !6} ; [ DW_TAG_typedef ] [int16_t] [line 30, size 0, align 0, offset 0] [from short]
-!5 = !{!"/usr/include/sys/_types/_int16_t.h", !"/tmp"}
-!6 = !{!"0x24\00short\000\0016\0016\000\000\005", null, null} ; [ DW_TAG_base_type ] [short] [line 0, size 16, align 16, offset 0, enc DW_ATE_signed]
+!4 = !DIDerivedType(tag: DW_TAG_typedef, name: "int16_t", line: 30, file: !5, baseType: !6)
+!5 = !DIFile(filename: "/usr/include/sys/_types/_int16_t.h", directory: "/tmp")
+!6 = !DIBasicType(tag: DW_TAG_base_type, name: "short", size: 16, align: 16, encoding: DW_ATE_signed)
 !7 = !{!8}
-!8 = !{!"0x2e\00foo\00foo\00\003\000\001\000\000\00256\000\003", !1, !9, !10, null, i32 (i32)* @foo, null, null, !2} ; [ DW_TAG_subprogram ] [line 3] [def] [foo]
-!9 = !{!"0x29", !1}    ; [ DW_TAG_file_type ] [/tmp/ghost-sdnode-dbgvalues.c]
-!10 = !{!"0x15\00\000\000\000\000\000\000", null, null, null, !11, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
+!8 = distinct !DISubprogram(name: "foo", line: 3, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !9, type: !10, variables: !2)
+!9 = !DIFile(filename: "ghost-sdnode-dbgvalues.c", directory: "/tmp")
+!10 = !DISubroutineType(types: !11)
 !11 = !{!12, !12}
-!12 = !{!"0x24\00int\000\0032\0032\000\000\005", null, null} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed]
+!12 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
 !13 = !{i32 2, !"Dwarf Version", i32 2}
-!14 = !{i32 2, !"Debug Info Version", i32 2}
+!14 = !{i32 2, !"Debug Info Version", i32 3}
 !15 = !{!"clang version 3.6.0 "}
-!16 = !{!"0x101\00a\0016777219\000", !8, !9, !12} ; [ DW_TAG_arg_variable ] [a] [line 3]
-!17 = !{!"0x102"}               ; [ DW_TAG_expression ]
-!18 = !MDLocation(line: 3, column: 13, scope: !8)
-!19 = !MDLocation(line: 4, column: 5, scope: !8)
-!20 = !{!"0x100\00b\004\000", !8, !9, !12} ; [ DW_TAG_auto_variable ] [b] [line 4]
-!21 = !MDLocation(line: 4, column: 9, scope: !8)
-!22 = !MDLocation(line: 5, column: 5, scope: !8)
-!23 = !{!"0x100\00c\005\000", !8, !9, !12} ; [ DW_TAG_auto_variable ] [c] [line 5]
-!24 = !MDLocation(line: 5, column: 9, scope: !8)
-!25 = !MDLocation(line: 6, column: 5, scope: !8)
-!26 = !{!"0x100\00d\006\000", !8, !9, !12} ; [ DW_TAG_auto_variable ] [d] [line 6]
-!27 = !MDLocation(line: 6, column: 9, scope: !8)
-!28 = !MDLocation(line: 7, column: 5, scope: !8)
-!29 = !{!"0x100\00e\007\000", !8, !9, !12} ; [ DW_TAG_auto_variable ] [e] [line 7]
-!30 = !MDLocation(line: 7, column: 9, scope: !8)
-!31 = !MDLocation(line: 8, column: 5, scope: !8)
-!32 = !{!"0x100\00f\008\000", !8, !9, !12} ; [ DW_TAG_auto_variable ] [f] [line 8]
-!33 = !MDLocation(line: 8, column: 9, scope: !8)
-!34 = !MDLocation(line: 9, column: 5, scope: !8)
+!16 = !DILocalVariable(name: "a", line: 3, arg: 1, scope: !8, file: !9, type: !12)
+!17 = !DIExpression()
+!18 = !DILocation(line: 3, column: 13, scope: !8)
+!19 = !DILocation(line: 4, column: 5, scope: !8)
+!20 = !DILocalVariable(name: "b", line: 4, scope: !8, file: !9, type: !12)
+!21 = !DILocation(line: 4, column: 9, scope: !8)
+!22 = !DILocation(line: 5, column: 5, scope: !8)
+!23 = !DILocalVariable(name: "c", line: 5, scope: !8, file: !9, type: !12)
+!24 = !DILocation(line: 5, column: 9, scope: !8)
+!25 = !DILocation(line: 6, column: 5, scope: !8)
+!26 = !DILocalVariable(name: "d", line: 6, scope: !8, file: !9, type: !12)
+!27 = !DILocation(line: 6, column: 9, scope: !8)
+!28 = !DILocation(line: 7, column: 5, scope: !8)
+!29 = !DILocalVariable(name: "e", line: 7, scope: !8, file: !9, type: !12)
+!30 = !DILocation(line: 7, column: 9, scope: !8)
+!31 = !DILocation(line: 8, column: 5, scope: !8)
+!32 = !DILocalVariable(name: "f", line: 8, scope: !8, file: !9, type: !12)
+!33 = !DILocation(line: 8, column: 9, scope: !8)
+!34 = !DILocation(line: 9, column: 5, scope: !8)