diff options
Diffstat (limited to 'test/DebugInfo/X86')
55 files changed, 463 insertions, 260 deletions
diff --git a/test/DebugInfo/X86/2010-04-13-PubType.ll b/test/DebugInfo/X86/2010-04-13-PubType.ll index fb611fd..c990bfc 100644 --- a/test/DebugInfo/X86/2010-04-13-PubType.ll +++ b/test/DebugInfo/X86/2010-04-13-PubType.ll @@ -50,5 +50,5 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone !16 = distinct !MDLexicalBlock(line: 7, column: 0, file: !18, scope: !1) !17 = !{!1} !18 = !MDFile(filename: "a.c", directory: "/tmp/") -!19 = !{i32 0} +!19 = !{} !20 = !{i32 1, !"Debug Info Version", i32 3} diff --git a/test/DebugInfo/X86/DW_AT_linkage_name.ll b/test/DebugInfo/X86/DW_AT_linkage_name.ll index 30a7aeb..daad4ab 100644 --- a/test/DebugInfo/X86/DW_AT_linkage_name.ll +++ b/test/DebugInfo/X86/DW_AT_linkage_name.ll @@ -83,16 +83,14 @@ attributes #2 = { ssp uwtable } !3 = !{!4} !4 = !MDCompositeType(tag: DW_TAG_structure_type, name: "A", line: 1, size: 8, align: 8, file: !1, elements: !5, identifier: "_ZTS1A") !5 = !{!6, !12} -!6 = !MDSubprogram(name: "A", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !"_ZTS1A", type: !7, variables: !11) +!6 = !MDSubprogram(name: "A", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !"_ZTS1A", type: !7) !7 = !MDSubroutineType(types: !8) !8 = !{null, !9, !10} !9 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1A") !10 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!11 = !{i32 786468} -!12 = !MDSubprogram(name: "~A", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !"_ZTS1A", type: !13, variables: !15) +!12 = !MDSubprogram(name: "~A", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !"_ZTS1A", type: !13) !13 = !MDSubroutineType(types: !14) !14 = !{null, !9} -!15 = !{i32 786468} !16 = !{!17, !18, !19} !17 = !MDSubprogram(name: "~A", linkageName: "_ZN1AD2Ev", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 6, file: !1, scope: !"_ZTS1A", type: !13, function: void (%struct.A*)* @_ZN1AD2Ev, declaration: !12, variables: !2) !18 = !MDSubprogram(name: "~A", linkageName: "_ZN1AD1Ev", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 6, file: !1, scope: !"_ZTS1A", type: !13, function: void (%struct.A*)* @_ZN1AD1Ev, declaration: !12, variables: !2) diff --git a/test/DebugInfo/X86/DW_AT_location-reference.ll b/test/DebugInfo/X86/DW_AT_location-reference.ll index 0e2dbdb..82ed0a9 100644 --- a/test/DebugInfo/X86/DW_AT_location-reference.ll +++ b/test/DebugInfo/X86/DW_AT_location-reference.ll @@ -104,7 +104,7 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon !0 = !MDSubprogram(name: "f", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 4, file: !23, scope: !1, type: !3, function: void ()* @f, variables: !22) !1 = !MDFile(filename: "simple.c", directory: "/home/rengol01/temp/tests/dwarf/relocation") -!2 = !MDCompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk)", isOptimized: true, emissionKind: 1, file: !23, enums: !4, retainedTypes: !4, subprograms: !21, imports: null) +!2 = !MDCompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk)", isOptimized: true, emissionKind: 1, file: !23, enums: !{}, retainedTypes: !{}, subprograms: !21, imports: null) !3 = !MDSubroutineType(types: !4) !4 = !{null} !5 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "x", line: 5, scope: !6, file: !1, type: !7) diff --git a/test/DebugInfo/X86/DW_AT_object_pointer.ll b/test/DebugInfo/X86/DW_AT_object_pointer.ll index 099d489..b8fa8b8 100644 --- a/test/DebugInfo/X86/DW_AT_object_pointer.ll +++ b/test/DebugInfo/X86/DW_AT_object_pointer.ll @@ -66,9 +66,7 @@ entry: !14 = !MDCompositeType(tag: DW_TAG_class_type, name: "A", line: 1, size: 32, align: 32, file: !37, elements: !15) !15 = !{!16, !17} !16 = !MDDerivedType(tag: DW_TAG_member, name: "m_a", line: 4, size: 32, align: 32, file: !37, scope: !14, baseType: !9) -!17 = !MDSubprogram(name: "A", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !6, scope: !14, type: !11, variables: !18) -!18 = !{!19} -!19 = !{} ; previously: invalid DW_TAG_base_type +!17 = !MDSubprogram(name: "A", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !6, scope: !14, type: !11) !20 = !MDSubprogram(name: "A", linkageName: "_ZN1AC2Ev", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !6, scope: null, type: !11, function: void (%class.A*)* @_ZN1AC2Ev, declaration: !17, variables: !1) !21 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "a", line: 8, scope: !22, file: !6, type: !14) !22 = distinct !MDLexicalBlock(line: 7, column: 11, file: !6, scope: !5) diff --git a/test/DebugInfo/X86/DW_TAG_friend.ll b/test/DebugInfo/X86/DW_TAG_friend.ll index 78f9be5..a90687a 100644 --- a/test/DebugInfo/X86/DW_TAG_friend.ll +++ b/test/DebugInfo/X86/DW_TAG_friend.ll @@ -27,22 +27,18 @@ !8 = !{!9, !11} !9 = !MDDerivedType(tag: DW_TAG_member, name: "a", line: 2, size: 32, align: 32, flags: DIFlagPrivate, file: !28, scope: !7, baseType: !10) !10 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!11 = !MDSubprogram(name: "A", line: 1, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !6, scope: !7, type: !12, variables: !15) +!11 = !MDSubprogram(name: "A", line: 1, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !6, scope: !7, type: !12) !12 = !MDSubroutineType(types: !13) !13 = !{null, !14} !14 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, baseType: !7) -!15 = !{!16} -!16 = !{} ; previously: invalid DW_TAG_base_type !17 = !MDGlobalVariable(name: "b", line: 11, isLocal: false, isDefinition: true, scope: null, file: !6, type: !18, variable: %class.B* @b) !18 = !MDCompositeType(tag: DW_TAG_class_type, name: "B", line: 5, size: 32, align: 32, file: !28, elements: !19) !19 = !{!20, !21, !27} !20 = !MDDerivedType(tag: DW_TAG_member, name: "b", line: 7, size: 32, align: 32, flags: DIFlagPrivate, file: !28, scope: !18, baseType: !10) -!21 = !MDSubprogram(name: "B", line: 5, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !6, scope: !18, type: !22, variables: !25) +!21 = !MDSubprogram(name: "B", line: 5, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !6, scope: !18, type: !22) !22 = !MDSubroutineType(types: !23) !23 = !{null, !24} !24 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, baseType: !18) -!25 = !{!26} -!26 = !{} ; previously: invalid DW_TAG_base_type -!27 = !MDDerivedType(tag: DW_TAG_friend, file: !18, baseType: !7) +!27 = !MDDerivedType(tag: DW_TAG_friend, file: !28, baseType: !7) !28 = !MDFile(filename: "foo.cpp", directory: "/Users/echristo/tmp") !29 = !{i32 1, !"Debug Info Version", i32 3} diff --git a/test/DebugInfo/X86/InlinedFnLocalVar.ll b/test/DebugInfo/X86/InlinedFnLocalVar.ll index c5be61f..3832e4f 100644 --- a/test/DebugInfo/X86/InlinedFnLocalVar.ll +++ b/test/DebugInfo/X86/InlinedFnLocalVar.ll @@ -15,8 +15,8 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon define i32 @bar() nounwind ssp { entry: %0 = load i32, i32* @i, align 4, !dbg !17 ; <i32> [#uses=2] - tail call void @llvm.dbg.value(metadata i32 %0, i64 0, metadata !9, metadata !MDExpression()), !dbg !19 - tail call void @llvm.dbg.declare(metadata !29, metadata !10, metadata !MDExpression()), !dbg !21 + tail call void @llvm.dbg.value(metadata i32 %0, i64 0, metadata !109, metadata !MDExpression()), !dbg !19 + tail call void @llvm.dbg.declare(metadata !29, metadata !110, metadata !MDExpression()), !dbg !21 %1 = mul nsw i32 %0, %0, !dbg !22 ; <i32> [#uses=2] store i32 %1, i32* @i, align 4, !dbg !17 ret i32 %1, !dbg !23 @@ -36,6 +36,10 @@ entry: !8 = !{!5} !9 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "j", line: 9, arg: 0, scope: !0, file: !1, type: !5) !10 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "xyz", line: 10, scope: !11, file: !1, type: !12) + +!109 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "j", line: 9, arg: 0, scope: !0, file: !1, type: !5) +!110 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "xyz", line: 10, scope: !11, file: !1, type: !12) + !11 = distinct !MDLexicalBlock(line: 9, column: 0, file: !1, scope: !0) !12 = !MDCompositeType(tag: DW_TAG_structure_type, name: "X", line: 10, size: 64, align: 32, file: !27, scope: !0, elements: !13) !13 = !{!14, !15} diff --git a/test/DebugInfo/X86/arange-and-stub.ll b/test/DebugInfo/X86/arange-and-stub.ll new file mode 100644 index 0000000..1952432 --- /dev/null +++ b/test/DebugInfo/X86/arange-and-stub.ll @@ -0,0 +1,53 @@ +; RUN: llc -generate-arange-section -relocation-model=pic < %s | FileCheck %s + +; CHECK: .section .data.rel,"aw",@progbits +; CHECK-NOT: .section +; CHECK: .L_ZTId.DW.stub: + +; CHECK: .section .data.rel,"aw",@progbits +; CHECK-NEXT: .Lsec_end0: + +target triple = "x86_64-linux-gnu" + +@_ZTId = external constant i8* +@zed = global [1 x void ()*] [void ()* @bar] + +define void @foo() { + ret void +} + +define void @bar() { + invoke void @foo() + to label %invoke.cont unwind label %lpad + +invoke.cont: ; preds = %0 + ret void + +lpad: ; preds = %0 + %tmp1 = landingpad { i8*, i32 } personality i8* bitcast (void ()* @foo to i8*) + filter [1 x i8*] [i8* bitcast (i8** @_ZTId to i8*)] + ret void +} + +!llvm.dbg.cu = !{!0} +!llvm.module.flags = !{!17, !18} + +!0 = !MDCompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.7.0 (trunk 234308) (llvm/trunk 234310)", isOptimized: false, runtimeVersion: 0, emissionKind: 1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !10, imports: !2) +!1 = !MDFile(filename: "/Users/espindola/llvm/<stdin>", directory: "/Users/espindola/llvm/build") +!2 = !{} +!3 = !{!4, !9} +!4 = !MDSubprogram(name: "foo", linkageName: "foo", scope: !5, file: !5, line: 1, type: !6, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, function: void ()* @foo, variables: !2) +!5 = !MDFile(filename: "/Users/espindola/llvm/test.cpp", directory: "/Users/espindola/llvm/build") +!6 = !MDSubroutineType(types: !7) +!7 = !{null, !8} +!8 = !MDBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) +!9 = !MDSubprogram(name: "bar_d", linkageName: "bar", scope: !5, file: !5, line: 3, type: !6, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, function: void ()* @bar, variables: !2) +!10 = !{!11} +!11 = !MDGlobalVariable(name: "zed", scope: !0, file: !5, line: 6, type: !12, isLocal: false, isDefinition: true, variable: [1 x void ()*]* @zed) +!12 = !MDCompositeType(tag: DW_TAG_array_type, baseType: !13, size: 64, align: 64, elements: !15) +!13 = !MDDerivedType(tag: DW_TAG_typedef, name: "vifunc", file: !5, line: 5, baseType: !14) +!14 = !MDDerivedType(tag: DW_TAG_pointer_type, baseType: !6, size: 64, align: 64) +!15 = !{!16} +!16 = !MDSubrange(count: 1) +!17 = !{i32 2, !"Dwarf Version", i32 4} +!18 = !{i32 2, !"Debug Info Version", i32 3} diff --git a/test/DebugInfo/X86/arguments.ll b/test/DebugInfo/X86/arguments.ll index 1b33f4e..4632711 100644 --- a/test/DebugInfo/X86/arguments.ll +++ b/test/DebugInfo/X86/arguments.ll @@ -61,13 +61,12 @@ attributes #1 = { nounwind readnone } !9 = !{!10, !12} !10 = !MDDerivedType(tag: DW_TAG_member, name: "i", line: 3, size: 32, align: 32, file: !1, scope: !8, baseType: !11) !11 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!12 = !MDSubprogram(name: "foo", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !8, type: !13, variables: !18) +!12 = !MDSubprogram(name: "foo", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !8, type: !13) !13 = !MDSubroutineType(types: !14) !14 = !{null, !15, !16} !15 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !8) !16 = !MDDerivedType(tag: DW_TAG_reference_type, baseType: !17) !17 = !MDDerivedType(tag: DW_TAG_const_type, baseType: !8) -!18 = !{i32 786468} !19 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "f", line: 6, arg: 1, scope: !4, file: !5, type: !8) !20 = !MDLocation(line: 6, scope: !4) !21 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "g", line: 6, arg: 2, scope: !4, file: !5, type: !8) diff --git a/test/DebugInfo/X86/block-capture.ll b/test/DebugInfo/X86/block-capture.ll index f78915f..314879b 100644 --- a/test/DebugInfo/X86/block-capture.ll +++ b/test/DebugInfo/X86/block-capture.ll @@ -45,7 +45,7 @@ entry: %3 = bitcast %struct.__block_literal_generic* %block.literal to i8*, !dbg !71 %4 = load i8*, i8** %2, !dbg !71 %5 = bitcast i8* %4 to void (i8*, ...)*, !dbg !71 - call void (i8*, ...)* %5(i8* %3), !dbg !71 + call void (i8*, ...) %5(i8* %3), !dbg !71 ret void, !dbg !73 } diff --git a/test/DebugInfo/X86/concrete_out_of_line.ll b/test/DebugInfo/X86/concrete_out_of_line.ll index db4c9b8..9895324 100644 --- a/test/DebugInfo/X86/concrete_out_of_line.ll +++ b/test/DebugInfo/X86/concrete_out_of_line.ll @@ -98,7 +98,7 @@ declare void @_Z8moz_freePv(i8*) !23 = !MDSubprogram(name: "~nsAutoRefCnt", linkageName: "_ZN17nsAutoRefCntD1Ev", line: 18, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 18, file: !6, scope: null, type: !16, function: void ()* @_ZN17nsAutoRefCntD1Ev, declaration: !15, variables: !24) !24 = !{!26} !26 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", line: 18, arg: 1, flags: DIFlagArtificial, scope: !23, file: !6, type: !10) -!27 = !MDSubprogram(name: "~nsAutoRefCnt", linkageName: "_ZN17nsAutoRefCntD2Ev", line: 18, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 18, file: !6, scope: null, type: !16, function: i32* null, declaration: !15, variables: !28) +!27 = !MDSubprogram(name: "~nsAutoRefCnt", linkageName: "_ZN17nsAutoRefCntD2Ev", line: 18, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 18, file: !6, scope: null, type: !16, function: i32 ()* null, declaration: !15, variables: !28) !28 = !{!30} !30 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", line: 18, arg: 1, flags: DIFlagArtificial, scope: !27, file: !6, type: !10) !31 = !MDSubprogram(name: "operator=", linkageName: "_ZN12nsAutoRefCntaSEi", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 4, file: !6, scope: null, type: !32, declaration: !36, variables: !43) diff --git a/test/DebugInfo/X86/cu-ranges-odr.ll b/test/DebugInfo/X86/cu-ranges-odr.ll index 70d99db..182b1fd 100644 --- a/test/DebugInfo/X86/cu-ranges-odr.ll +++ b/test/DebugInfo/X86/cu-ranges-odr.ll @@ -69,11 +69,10 @@ attributes #1 = { nounwind readnone } !5 = !{!6, !8} !6 = !MDDerivedType(tag: DW_TAG_member, name: "a", line: 5, size: 32, align: 32, flags: DIFlagPrivate, file: !1, scope: !"_ZTS1A", baseType: !7) !7 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!8 = !MDSubprogram(name: "A", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !"_ZTS1A", type: !9, variables: !12) +!8 = !MDSubprogram(name: "A", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !"_ZTS1A", type: !9) !9 = !MDSubroutineType(types: !10) !10 = !{null, !11, !7} !11 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1A") -!12 = !{i32 786468} !13 = !{!14, !18, !19} !14 = !MDSubprogram(name: "__cxx_global_var_init", line: 8, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 8, file: !1, scope: !15, type: !16, function: void ()* @__cxx_global_var_init, variables: !2) !15 = !MDFile(filename: "baz.cpp", directory: "/usr/local/google/home/echristo/tmp") diff --git a/test/DebugInfo/X86/dbg-byval-parameter.ll b/test/DebugInfo/X86/dbg-byval-parameter.ll index ffab194..c30e977 100644 --- a/test/DebugInfo/X86/dbg-byval-parameter.ll +++ b/test/DebugInfo/X86/dbg-byval-parameter.ll @@ -48,5 +48,5 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone !17 = distinct !MDLexicalBlock(line: 11, column: 0, file: !19, scope: !1) !18 = !{!1} !19 = !MDFile(filename: "b2.c", directory: "/tmp/") -!20 = !{i32 0} +!20 = !{} !21 = !{i32 1, !"Debug Info Version", i32 3} diff --git a/test/DebugInfo/X86/dbg-const-int.ll b/test/DebugInfo/X86/dbg-const-int.ll index 8aa4e1c..abe4e94 100644 --- a/test/DebugInfo/X86/dbg-const-int.ll +++ b/test/DebugInfo/X86/dbg-const-int.ll @@ -35,5 +35,5 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon !11 = !{!1} !12 = !{!6} !13 = !MDFile(filename: "a.c", directory: "/private/tmp") -!14 = !{i32 0} +!14 = !{} !15 = !{i32 1, !"Debug Info Version", i32 3} diff --git a/test/DebugInfo/X86/dbg-const.ll b/test/DebugInfo/X86/dbg-const.ll index a0f9efe..fd20c3c 100644 --- a/test/DebugInfo/X86/dbg-const.ll +++ b/test/DebugInfo/X86/dbg-const.ll @@ -47,5 +47,5 @@ declare i32 @bar() nounwind readnone !13 = !{!0} !14 = !{!6} !15 = !MDFile(filename: "mu.c", directory: "/private/tmp") -!16 = !{i32 0} +!16 = !{} !17 = !{i32 1, !"Debug Info Version", i32 3} diff --git a/test/DebugInfo/X86/dbg-declare-arg.ll b/test/DebugInfo/X86/dbg-declare-arg.ll index f6670e9..a3a61e5 100644 --- a/test/DebugInfo/X86/dbg-declare-arg.ll +++ b/test/DebugInfo/X86/dbg-declare-arg.ll @@ -74,7 +74,7 @@ entry: !0 = !MDSubprogram(name: "~A", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !51, scope: !1, type: !11) !1 = !MDCompositeType(tag: DW_TAG_class_type, name: "A", line: 2, size: 128, align: 32, file: !51, scope: !2, elements: !4) -!2 = !MDCompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.0 (trunk 130127)", isOptimized: false, emissionKind: 1, file: !51, enums: !24, retainedTypes: !24, subprograms: !50) +!2 = !MDCompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.0 (trunk 130127)", isOptimized: false, emissionKind: 1, file: !51, enums: !{}, retainedTypes: !{}, subprograms: !50) !3 = !MDFile(filename: "a.cc", directory: "/private/tmp") !4 = !{!5, !7, !8, !9, !0, !10, !14} !5 = !MDDerivedType(tag: DW_TAG_member, name: "x", line: 2, size: 32, align: 32, file: !51, scope: !3, baseType: !6) @@ -85,12 +85,12 @@ entry: !10 = !MDSubprogram(name: "A", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, file: !51, scope: !1, type: !11) !11 = !MDSubroutineType(types: !12) !12 = !{null, !13} -!13 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, file: !2, baseType: !1) +!13 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, file: !3, baseType: !1) !14 = !MDSubprogram(name: "A", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, file: !51, scope: !1, type: !15) !15 = !MDSubroutineType(types: !16) !16 = !{null, !13, !17} !17 = !MDDerivedType(tag: DW_TAG_reference_type, scope: !2, baseType: !18) -!18 = !MDDerivedType(tag: DW_TAG_const_type, file: !2, baseType: !1) +!18 = !MDDerivedType(tag: DW_TAG_const_type, file: !3, baseType: !1) !19 = !MDSubprogram(name: "foo", linkageName: "_Z3fooi", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !51, scope: !3, type: !20, function: void (%class.A*, i32)* @_Z3fooi) !20 = !MDSubroutineType(types: !21) !21 = !{!1} @@ -110,7 +110,7 @@ entry: !35 = !MDLocation(line: 8, column: 3, scope: !34) !36 = !MDLocation(line: 9, column: 9, scope: !29) !37 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "my_a", line: 9, scope: !29, file: !3, type: !38) -!38 = !MDDerivedType(tag: DW_TAG_reference_type, file: !2, baseType: !1) +!38 = !MDDerivedType(tag: DW_TAG_reference_type, file: !3, baseType: !1) !39 = !MDLocation(line: 9, column: 5, scope: !29) !40 = !MDLocation(line: 10, column: 3, scope: !29) !41 = !MDLocation(line: 11, column: 3, scope: !29) diff --git a/test/DebugInfo/X86/dbg-file-name.ll b/test/DebugInfo/X86/dbg-file-name.ll index 42f015a..7ded7c4 100644 --- a/test/DebugInfo/X86/dbg-file-name.ll +++ b/test/DebugInfo/X86/dbg-file-name.ll @@ -20,5 +20,5 @@ define i32 @main() nounwind { !8 = !{!5} !9 = !{!6} !10 = !MDFile(filename: "simple.c", directory: "/Users/manav/one/two") -!11 = !{i32 0} +!11 = !{} !12 = !{i32 1, !"Debug Info Version", i32 3} diff --git a/test/DebugInfo/X86/dbg-i128-const.ll b/test/DebugInfo/X86/dbg-i128-const.ll index d172f01..1b89188 100644 --- a/test/DebugInfo/X86/dbg-i128-const.ll +++ b/test/DebugInfo/X86/dbg-i128-const.ll @@ -31,5 +31,5 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon !12 = !{!3} !13 = !MDFile(filename: "foo.c", directory: "/tmp") !14 = !MDFile(filename: "myint.h", directory: "/tmp") -!15 = !{i32 0} +!15 = !{} !16 = !{i32 1, !"Debug Info Version", i32 3} diff --git a/test/DebugInfo/X86/dbg-merge-loc-entry.ll b/test/DebugInfo/X86/dbg-merge-loc-entry.ll index fda8f28..b46fe2b 100644 --- a/test/DebugInfo/X86/dbg-merge-loc-entry.ll +++ b/test/DebugInfo/X86/dbg-merge-loc-entry.ll @@ -71,5 +71,5 @@ declare %0 @llvm.uadd.with.overflow.i64(i64, i64) nounwind readnone !28 = !{!0, !9} !29 = !MDFile(filename: "foobar.c", directory: "/tmp") !30 = !MDFile(filename: "foobar.h", directory: "/tmp") -!31 = !{i32 0} +!31 = !{} !32 = !{i32 1, !"Debug Info Version", i32 3} diff --git a/test/DebugInfo/X86/dbg-prolog-end.ll b/test/DebugInfo/X86/dbg-prolog-end.ll index 3467c3f..54c2434 100644 --- a/test/DebugInfo/X86/dbg-prolog-end.ll +++ b/test/DebugInfo/X86/dbg-prolog-end.ll @@ -55,5 +55,5 @@ entry: !16 = !MDLocation(line: 8, column: 2, scope: !17) !17 = distinct !MDLexicalBlock(line: 7, column: 12, file: !19, scope: !6) !19 = !MDFile(filename: "/tmp/a.c", directory: "/private/tmp") -!20 = !{i32 0} +!20 = !{} !21 = !{i32 1, !"Debug Info Version", i32 3} diff --git a/test/DebugInfo/X86/dbg-value-const-byref.ll b/test/DebugInfo/X86/dbg-value-const-byref.ll index f8453a5..766b72e 100644 --- a/test/DebugInfo/X86/dbg-value-const-byref.ll +++ b/test/DebugInfo/X86/dbg-value-const-byref.ll @@ -53,7 +53,7 @@ entry: call void @llvm.dbg.value(metadata i32 3, i64 0, metadata !10, metadata !MDExpression()), !dbg !15 %call = call i32 @f3(i32 3) #3, !dbg !16 call void @llvm.dbg.value(metadata i32 7, i64 0, metadata !10, metadata !MDExpression()), !dbg !18 - %call1 = call i32 (...)* @f1() #3, !dbg !19 + %call1 = call i32 (...) @f1() #3, !dbg !19 call void @llvm.dbg.value(metadata i32 %call1, i64 0, metadata !10, metadata !MDExpression()), !dbg !19 store i32 %call1, i32* %i, align 4, !dbg !19, !tbaa !20 call void @llvm.dbg.value(metadata i32* %i, i64 0, metadata !10, metadata !MDExpression()), !dbg !24 diff --git a/test/DebugInfo/X86/dbg-value-dag-combine.ll b/test/DebugInfo/X86/dbg-value-dag-combine.ll index 2f4e83d..7370e8d 100644 --- a/test/DebugInfo/X86/dbg-value-dag-combine.ll +++ b/test/DebugInfo/X86/dbg-value-dag-combine.ll @@ -36,7 +36,7 @@ entry: !9 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "gid", line: 3, scope: !10, file: !1, type: !6) !10 = distinct !MDLexicalBlock(line: 2, column: 1, file: !19, scope: !0) !11 = !MDLocation(line: 3, column: 41, scope: !10) -!12 = !{i32 0} +!12 = !{} !13 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "idx", line: 4, scope: !10, file: !1, type: !6) !14 = !MDLocation(line: 4, column: 20, scope: !10) !15 = !MDLocation(line: 5, column: 15, scope: !10) diff --git a/test/DebugInfo/X86/dbg-value-inlined-parameter.ll b/test/DebugInfo/X86/dbg-value-inlined-parameter.ll index 0ba5f62..df650b7 100644 --- a/test/DebugInfo/X86/dbg-value-inlined-parameter.ll +++ b/test/DebugInfo/X86/dbg-value-inlined-parameter.ll @@ -76,14 +76,14 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon !0 = !MDSubprogram(name: "foo", line: 8, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 8, file: !1, scope: !1, type: !3, function: i32 (%struct.S1*, i32)* @foo, variables: !41) !1 = !MDFile(filename: "nm2.c", directory: "/private/tmp") -!2 = !MDCompileUnit(language: DW_LANG_C99, producer: "clang version 2.9 (trunk 125693)", isOptimized: true, emissionKind: 1, file: !42, enums: !8, retainedTypes: !8, subprograms: !39, globals: !40, imports: !44) +!2 = !MDCompileUnit(language: DW_LANG_C99, producer: "clang version 2.9 (trunk 125693)", isOptimized: true, emissionKind: 1, file: !42, enums: !{}, retainedTypes: !{}, subprograms: !39, globals: !40, imports: !44) !3 = !MDSubroutineType(types: !4) !4 = !{!5} !5 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !6 = !MDSubprogram(name: "foobar", line: 15, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, file: !1, scope: !1, type: !7, function: void ()* @foobar) !7 = !MDSubroutineType(types: !8) !8 = !{null} -!9 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "sp", line: 7, arg: 1, scope: !0, file: !1, type: !10, inlinedAt: !32) +!9 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "sp", line: 7, arg: 1, scope: !0, file: !1, type: !10) !10 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, scope: !2, baseType: !11) !11 = !MDDerivedType(tag: DW_TAG_typedef, name: "S1", line: 4, file: !42, scope: !2, baseType: !12) !12 = !MDCompositeType(tag: DW_TAG_structure_type, name: "S1", line: 1, size: 128, align: 64, file: !42, scope: !2, elements: !13) @@ -92,7 +92,7 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon !15 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, scope: !2, baseType: !16) !16 = !MDBasicType(tag: DW_TAG_base_type, name: "float", size: 32, align: 32, encoding: DW_ATE_float) !17 = !MDDerivedType(tag: DW_TAG_member, name: "nums", line: 3, size: 32, align: 32, offset: 64, file: !42, scope: !1, baseType: !5) -!18 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "nums", line: 7, arg: 2, scope: !0, file: !1, type: !5, inlinedAt: !32) +!18 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "nums", line: 7, arg: 2, scope: !0, file: !1, type: !5) !19 = !MDGlobalVariable(name: "p", line: 14, isLocal: false, isDefinition: true, scope: !2, file: !1, type: !11, variable: %struct.S1* @p) !20 = !MDLocation(line: 7, column: 13, scope: !0) !21 = !MDLocation(line: 7, column: 21, scope: !0) diff --git a/test/DebugInfo/X86/dbg-value-isel.ll b/test/DebugInfo/X86/dbg-value-isel.ll index 5c000f7..823cacd 100644 --- a/test/DebugInfo/X86/dbg-value-isel.ll +++ b/test/DebugInfo/X86/dbg-value-isel.ll @@ -102,5 +102,5 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon !18 = !MDLocation(line: 10, column: 1, scope: !0) !19 = !{!0} !20 = !MDFile(filename: "OCLlLwTXZ.cl", directory: "/tmp") -!21 = !{i32 0} +!21 = !{} !22 = !{i32 1, !"Debug Info Version", i32 3} diff --git a/test/DebugInfo/X86/dbg-value-location.ll b/test/DebugInfo/X86/dbg-value-location.ll index d852ee3..2a8a91c 100644 --- a/test/DebugInfo/X86/dbg-value-location.ll +++ b/test/DebugInfo/X86/dbg-value-location.ll @@ -75,5 +75,5 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon !25 = !MDFile(filename: "f.i", directory: "/tmp") !26 = !MDFile(filename: "/tmp/f.c", directory: "/tmp") !27 = !MDFile(filename: "f.i", directory: "/tmp") -!28 = !{i32 0} +!28 = !{} !29 = !{i32 1, !"Debug Info Version", i32 3} diff --git a/test/DebugInfo/X86/dbg-value-range.ll b/test/DebugInfo/X86/dbg-value-range.ll index a49b503..df1ab7b 100644 --- a/test/DebugInfo/X86/dbg-value-range.ll +++ b/test/DebugInfo/X86/dbg-value-range.ll @@ -8,7 +8,7 @@ entry: %tmp1 = getelementptr inbounds %struct.a, %struct.a* %b, i64 0, i32 0, !dbg !14 %tmp2 = load i32, i32* %tmp1, align 4, !dbg !14 tail call void @llvm.dbg.value(metadata i32 %tmp2, i64 0, metadata !11, metadata !MDExpression()), !dbg !14 - %call = tail call i32 (...)* @foo(i32 %tmp2) nounwind , !dbg !18 + %call = tail call i32 (...) @foo(i32 %tmp2) nounwind , !dbg !18 %add = add nsw i32 %tmp2, 1, !dbg !19 ret i32 %add, !dbg !19 } @@ -40,7 +40,7 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon !20 = !{!0} !21 = !{!6, !11} !22 = !MDFile(filename: "bar.c", directory: "/private/tmp") -!23 = !{i32 0} +!23 = !{} ; Check that variable bar:b value range is appropriately truncated in debug info. ; The variable is in %rdi which is clobbered by 'movl %ebx, %edi' diff --git a/test/DebugInfo/X86/dbg-value-terminator.ll b/test/DebugInfo/X86/dbg-value-terminator.ll index 2cea3f9..24841ab 100644 --- a/test/DebugInfo/X86/dbg-value-terminator.ll +++ b/test/DebugInfo/X86/dbg-value-terminator.ll @@ -129,5 +129,5 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon !18 = !{!1} !19 = !{!6, !7, !10} !20 = !MDFile(filename: "a.c", directory: "/private/tmp") -!21 = !{i32 0} +!21 = !{} !22 = !{i32 1, !"Debug Info Version", i32 3} diff --git a/test/DebugInfo/X86/dbg_value_direct.ll b/test/DebugInfo/X86/dbg_value_direct.ll index 890e9cd..22c5ce5 100644 --- a/test/DebugInfo/X86/dbg_value_direct.ll +++ b/test/DebugInfo/X86/dbg_value_direct.ll @@ -53,7 +53,7 @@ entry: %19 = inttoptr i64 %18 to i8* %20 = load i8, i8* %19 %21 = icmp ne i8 %20, 0 - call void @llvm.dbg.declare(metadata i32* %3, metadata !23, metadata !28) + call void @llvm.dbg.declare(metadata i32* %3, metadata !23, metadata !28), !dbg !MDLocation(scope: !4) br i1 %21, label %22, label %28 ; <label>:22 ; preds = %entry @@ -157,17 +157,15 @@ attributes #2 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "n !7 = !{!8, !21} !8 = !MDCompositeType(tag: DW_TAG_structure_type, name: "A", line: 1, size: 8, align: 8, file: !1, elements: !9) !9 = !{!10, !15} -!10 = !MDSubprogram(name: "A", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !8, type: !11, variables: !14) +!10 = !MDSubprogram(name: "A", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !8, type: !11) !11 = !MDSubroutineType(types: !12) !12 = !{null, !13} !13 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !8) -!14 = !{i32 786468} -!15 = !MDSubprogram(name: "A", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !8, type: !16, variables: !20) +!15 = !MDSubprogram(name: "A", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !8, type: !16) !16 = !MDSubroutineType(types: !17) !17 = !{null, !13, !18} !18 = !MDDerivedType(tag: DW_TAG_reference_type, baseType: !19) !19 = !MDDerivedType(tag: DW_TAG_const_type, baseType: !8) -!20 = !{i32 786468} !21 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !22 = !{i32 2, !"Dwarf Version", i32 3} !23 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "", line: 6, arg: 1, scope: !4, file: !5, type: !21) diff --git a/test/DebugInfo/X86/debug-loc-asan.ll b/test/DebugInfo/X86/debug-loc-asan.ll index b15668a..a30c13f 100644 --- a/test/DebugInfo/X86/debug-loc-asan.ll +++ b/test/DebugInfo/X86/debug-loc-asan.ll @@ -77,7 +77,7 @@ entry: %21 = inttoptr i64 %20 to i8* %22 = load i8, i8* %21 %23 = icmp ne i8 %22, 0 - call void @llvm.dbg.declare(metadata i32* %8, metadata !12, metadata !14) + call void @llvm.dbg.declare(metadata i32* %8, metadata !12, metadata !14), !dbg !MDLocation(scope: !4) br i1 %23, label %24, label %30 ; <label>:24 ; preds = %5 diff --git a/test/DebugInfo/X86/debug-ranges-offset.ll b/test/DebugInfo/X86/debug-ranges-offset.ll index c779cea..55872db 100644 --- a/test/DebugInfo/X86/debug-ranges-offset.ll +++ b/test/DebugInfo/X86/debug-ranges-offset.ll @@ -234,7 +234,7 @@ attributes #4 = { builtin } !29 = !MDLocation(line: 7, scope: !4) !30 = !MDLocation(line: 4, scope: !4, inlinedAt: !31) !31 = !MDLocation(line: 10, scope: !13) -!32 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "p", line: 4, scope: !4, file: !5, type: !10, inlinedAt: !31) +!32 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "p", line: 4, scope: !4, file: !5, type: !10) !33 = !MDLocation(line: 5, scope: !21, inlinedAt: !31) !34 = !MDLocation(line: 6, scope: !21, inlinedAt: !31) !35 = !MDLocation(line: 7, scope: !4, inlinedAt: !31) diff --git a/test/DebugInfo/X86/debug_frame.ll b/test/DebugInfo/X86/debug_frame.ll index ca42993..49aea75 100644 --- a/test/DebugInfo/X86/debug_frame.ll +++ b/test/DebugInfo/X86/debug_frame.ll @@ -15,7 +15,7 @@ entry: !0 = !MDSubprogram(name: "f", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 1, file: !6, scope: !1, type: !3, function: void ()* @f) !1 = !MDFile(filename: "/home/espindola/llvm/test.c", directory: "/home/espindola/llvm/build") -!2 = !MDCompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 ()", isOptimized: true, emissionKind: 0, file: !6, enums: !4, retainedTypes: !4, subprograms: !5) +!2 = !MDCompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 ()", isOptimized: true, emissionKind: 0, file: !6, enums: !{}, retainedTypes: !{}, subprograms: !5) !3 = !MDSubroutineType(types: !4) !4 = !{null} !6 = !MDFile(filename: "/home/espindola/llvm/test.c", directory: "/home/espindola/llvm/build") diff --git a/test/DebugInfo/X86/deleted-bit-piece.ll b/test/DebugInfo/X86/deleted-bit-piece.ll new file mode 100644 index 0000000..b8ae9b1 --- /dev/null +++ b/test/DebugInfo/X86/deleted-bit-piece.ll @@ -0,0 +1,46 @@ +; RUN: llc < %s | FileCheck %s +; This is mainly a crasher for the revert in r234717. A debug info intrinsic +; that gets deleted can't have its bit piece expression verified after it's +; deleted. + +target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-apple-macosx10.8.0" + +; CHECK: __Z3foov: +; CHECK: retq + +define void @_Z3foov() { +entry: + br i1 undef, label %exit, label %bb + +bb: ; preds = %entry + call void @llvm.dbg.value(metadata i8* undef, i64 0, metadata !15, metadata !16), !dbg !17 + br label %exit + +exit: ; preds = %bb, %entry + ret void +} + +declare void @llvm.dbg.value(metadata, i64, metadata, metadata) + +!llvm.module.flags = !{!0, !1} +!llvm.dbg.cu = !{!2} + +!0 = !{i32 2, !"Dwarf Version", i32 2} +!1 = !{i32 2, !"Debug Info Version", i32 3} +!2 = !MDCompileUnit(language: DW_LANG_C_plus_plus, file: !3, isOptimized: true, runtimeVersion: 0, emissionKind: 1, enums: !4, retainedTypes: !5, subprograms: !11, globals: !4, imports: !4) +!3 = !MDFile(filename: "foo.cpp", directory: "/path/to/dir") +!4 = !{} +!5 = !{!6} +!6 = !MDCompositeType(tag: DW_TAG_structure_type, name: "Class", size: 64, align: 64, elements: !7, identifier: "_ZT5Class") +!7 = !{!8, !10} +!8 = !MDDerivedType(tag: DW_TAG_member, name: "a", scope: !"_ZT5Class", baseType: !9, size: 32, align: 32) +!9 = !MDBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) +!10 = !MDDerivedType(tag: DW_TAG_member, name: "b", scope: !"_ZT5Class", baseType: !9, size: 32, align: 32) +!11 = !{!12} +!12 = !MDSubprogram(name: "foo", scope: null, file: !3, type: !13, isLocal: false, isDefinition: true, isOptimized: false, function: void ()* @_Z3foov) +!13 = !MDSubroutineType(types: !14) +!14 = !{null} +!15 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "v", scope: !12, type: !"_ZT5Class") +!16 = !MDExpression(DW_OP_bit_piece, 32, 32) +!17 = !MDLocation(line: 2755, column: 9, scope: !12) diff --git a/test/DebugInfo/X86/earlydup-crash.ll b/test/DebugInfo/X86/earlydup-crash.ll index 81986f6..5525a3c 100644 --- a/test/DebugInfo/X86/earlydup-crash.ll +++ b/test/DebugInfo/X86/earlydup-crash.ll @@ -13,7 +13,7 @@ entry: bb: ; preds = %entry %tmp = icmp eq i32 undef, 0 %tmp1 = add i32 0, 11 - call void @llvm.dbg.value(metadata i32 %tmp1, i64 0, metadata !0, metadata !MDExpression()) + call void @llvm.dbg.value(metadata i32 %tmp1, i64 0, metadata !0, metadata !MDExpression()), !dbg !MDLocation(scope: !1) br i1 undef, label %bb18, label %bb31.preheader bb31.preheader: ; preds = %bb19, %bb @@ -90,5 +90,5 @@ declare void @foobar(i32) !43 = !MDFile(filename: "stddef.h", directory: "/Users/espindola/llvm/build-llvm-gcc/./prev-gcc/include") !44 = !MDFile(filename: "darwin-c.c", directory: "/Users/espindola/llvm/build-llvm-gcc/gcc/../../llvm-gcc-4.2/gcc/config") !45 = !{!2} -!46 = !{i32 0} +!46 = !{} !47 = !{i32 1, !"Debug Info Version", i32 3} diff --git a/test/DebugInfo/X86/elf-names.ll b/test/DebugInfo/X86/elf-names.ll index c56109d..4344a5b 100644 --- a/test/DebugInfo/X86/elf-names.ll +++ b/test/DebugInfo/X86/elf-names.ll @@ -77,16 +77,12 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon !14 = !MDDerivedType(tag: DW_TAG_member, name: "c2", line: 7, size: 32, align: 32, offset: 32, flags: DIFlagPrivate, file: !53, scope: !10, baseType: !13) !15 = !MDDerivedType(tag: DW_TAG_member, name: "c3", line: 8, size: 32, align: 32, offset: 64, flags: DIFlagPrivate, file: !53, scope: !10, baseType: !13) !16 = !MDDerivedType(tag: DW_TAG_member, name: "c4", line: 9, size: 32, align: 32, offset: 96, flags: DIFlagPrivate, file: !53, scope: !10, baseType: !13) -!17 = !MDSubprogram(name: "D", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3, file: !6, scope: !10, type: !7, variables: !18) -!18 = !{!19} -!19 = !{} ; previously: invalid DW_TAG_base_type -!20 = !MDSubprogram(name: "D", line: 4, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 4, file: !6, scope: !10, type: !21, variables: !25) +!17 = !MDSubprogram(name: "D", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3, file: !6, scope: !10, type: !7) +!20 = !MDSubprogram(name: "D", line: 4, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 4, file: !6, scope: !10, type: !21) !21 = !MDSubroutineType(types: !22) !22 = !{null, !9, !23} !23 = !MDDerivedType(tag: DW_TAG_reference_type, baseType: !24) !24 = !MDDerivedType(tag: DW_TAG_const_type, baseType: !10) -!25 = !{!26} -!26 = !{} ; previously: invalid DW_TAG_base_type !27 = !{!29} !29 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", line: 12, arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !5, file: !6, type: !30) !30 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !10) diff --git a/test/DebugInfo/X86/empty-array.ll b/test/DebugInfo/X86/empty-array.ll index 628234c..678738d 100644 --- a/test/DebugInfo/X86/empty-array.ll +++ b/test/DebugInfo/X86/empty-array.ll @@ -39,11 +39,9 @@ !11 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !12 = !{!13} !13 = !MDSubrange(count: -1) -!14 = !MDSubprogram(name: "A", line: 1, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !6, scope: !7, type: !15, variables: !18) +!14 = !MDSubprogram(name: "A", line: 1, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !6, scope: !7, type: !15) !15 = !MDSubroutineType(types: !16) !16 = !{null, !17} !17 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !7) -!18 = !{!19} -!19 = !{} ; previously: invalid DW_TAG_base_type !20 = !MDFile(filename: "t.cpp", directory: "/Volumes/Sandbox/llvm") !21 = !{i32 1, !"Debug Info Version", i32 3} diff --git a/test/DebugInfo/X86/formal_parameter.ll b/test/DebugInfo/X86/formal_parameter.ll index ba89ac4..97f45ec 100644 --- a/test/DebugInfo/X86/formal_parameter.ll +++ b/test/DebugInfo/X86/formal_parameter.ll @@ -29,7 +29,7 @@ entry: %map.addr = alloca i32, align 4 store i32 %map, i32* %map.addr, align 4, !tbaa !15 call void @llvm.dbg.declare(metadata i32* %map.addr, metadata !10, metadata !MDExpression()), !dbg !14 - %call = call i32 (i32*, ...)* bitcast (i32 (...)* @lookup to i32 (i32*, ...)*)(i32* %map.addr) #3, !dbg !19 + %call = call i32 (i32*, ...) bitcast (i32 (...)* @lookup to i32 (i32*, ...)*)(i32* %map.addr) #3, !dbg !19 ; Ensure that all dbg intrinsics have the same scope after ; LowerDbgDeclare is finished with them. ; @@ -37,7 +37,7 @@ entry: ; LOWERING: call void @llvm.dbg.value{{.*}}, !dbg ![[LOC]] ; LOWERING: call void @llvm.dbg.value{{.*}}, !dbg ![[LOC]] %0 = load i32, i32* %map.addr, align 4, !dbg !20, !tbaa !15 - %call1 = call i32 (i32, ...)* bitcast (i32 (...)* @verify to i32 (i32, ...)*)(i32 %0) #3, !dbg !20 + %call1 = call i32 (i32, ...) bitcast (i32 (...)* @verify to i32 (i32, ...)*)(i32 %0) #3, !dbg !20 ret void, !dbg !22 } diff --git a/test/DebugInfo/X86/generate-odr-hash.ll b/test/DebugInfo/X86/generate-odr-hash.ll index e26eb14..b5c100a 100644 --- a/test/DebugInfo/X86/generate-odr-hash.ll +++ b/test/DebugInfo/X86/generate-odr-hash.ll @@ -250,11 +250,10 @@ attributes #1 = { nounwind readnone } !28 = !MDCompositeType(tag: DW_TAG_structure_type, name: "walrus", line: 24, size: 8, align: 8, file: !1, scope: !29, elements: !30) !29 = !MDNamespace(line: 23, file: !1, scope: null) !30 = !{!31} -!31 = !MDSubprogram(name: "walrus", line: 25, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 25, file: !1, scope: !28, type: !32, variables: !35) +!31 = !MDSubprogram(name: "walrus", line: 25, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 25, file: !1, scope: !28, type: !32) !32 = !MDSubroutineType(types: !33) !33 = !{null, !34} !34 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !28) -!35 = !{i32 786468} !36 = !MDSubprogram(name: "", linkageName: "_GLOBAL__I_a", line: 25, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagArtificial, isOptimized: false, scopeLine: 25, file: !1, scope: !23, type: !37, function: void ()* @_GLOBAL__I_a, variables: !2) !37 = !MDSubroutineType(types: !2) !38 = !{!39, !40, !41, !42} diff --git a/test/DebugInfo/X86/gnu-public-names.ll b/test/DebugInfo/X86/gnu-public-names.ll index e7bb0a1..e57b3eb 100644 --- a/test/DebugInfo/X86/gnu-public-names.ll +++ b/test/DebugInfo/X86/gnu-public-names.ll @@ -31,10 +31,38 @@ ; global_variable.member_function(); ; } ; int global_namespace_variable = 1; +; extern int global_namespace_variable_decl; ; struct D { ; int A; ; } d; ; } +; +; using ns::global_namespace_variable_decl; +; +; namespace { +; int i; +; } +; +; int *f3() { +; static int z; +; return &z; +; } +; +; namespace { +; namespace inner { +; int b; +; } +; } +; +; namespace outer { +; namespace { +; int c; +; } +; } +; +; int f7() { +; return i + *f3() + inner::b + outer::c; +; } ; ASM: .section .debug_gnu_pubnames ; ASM: .byte 32 # Kind: VARIABLE, EXTERNAL @@ -109,6 +137,25 @@ ; CHECK: NULL ; CHECK-NOT: {{DW_TAG|NULL}} +; CHECK: [[ANON:.*]]: DW_TAG_namespace +; CHECK-NOT: DW_AT_name +; CHECK: [[ANON_I:.*]]: DW_TAG_variable +; CHECK-NOT: DW_TAG +; CHECK: DW_AT_name {{.*}} "i" +; CHECK-NOT: {{DW_TAG|NULL}} +; CHECK: [[ANON_INNER:.*]]: DW_TAG_namespace +; CHECK-NOT: DW_TAG +; CHECK: DW_AT_name {{.*}} "inner" +; CHECK-NOT: {{DW_TAG|NULL}} +; CHECK: [[ANON_INNER_B:.*]]: DW_TAG_variable +; CHECK-NOT: DW_TAG +; CHECK: DW_AT_name {{.*}} "b" +; CHECK-NOT: {{DW_TAG|NULL}} +; CHECK: NULL +; CHECK-NOT: {{DW_TAG|NULL}} +; CHECK: NULL +; CHECK-NOT: {{DW_TAG|NULL}} + ; CHECK: [[OUTER:.*]]: DW_TAG_namespace ; CHECK-NOT: DW_TAG ; CHECK: DW_AT_name {{.*}} "outer" @@ -130,23 +177,7 @@ ; CHECK: NULL ; CHECK-NOT: {{DW_TAG|NULL}} -; CHECK: [[ANON:.*]]: DW_TAG_namespace -; CHECK-NOT: DW_AT_name -; CHECK: [[ANON_INNER:.*]]: DW_TAG_namespace -; CHECK-NOT: DW_TAG -; CHECK: DW_AT_name {{.*}} "inner" -; CHECK-NOT: {{DW_TAG|NULL}} -; CHECK: [[ANON_INNER_B:.*]]: DW_TAG_variable -; CHECK-NOT: DW_TAG -; CHECK: DW_AT_name {{.*}} "b" -; CHECK-NOT: {{DW_TAG|NULL}} -; CHECK: NULL -; CHECK-NOT: {{DW_TAG|NULL}} -; CHECK: [[ANON_I:.*]]: DW_TAG_variable -; CHECK-NOT: DW_TAG -; CHECK: DW_AT_name {{.*}} "i" -; CHECK-NOT: {{DW_TAG|NULL}} -; CHECK: NULL +; CHECK: DW_TAG_imported_declaration ; CHECK-NOT: {{DW_TAG|NULL}} ; CHECK: [[MEM_FUNC:0x[0-9a-f]+]]: DW_TAG_subprogram @@ -166,29 +197,28 @@ ; CHECK-LABEL: .debug_gnu_pubnames contents: ; CHECK-NEXT: length = {{.*}} version = 0x0002 unit_offset = 0x00000000 unit_size = {{.*}} ; CHECK-NEXT: Offset Linkage Kind Name -; CHECK-DAG: [[GLOBAL_FUNC]] EXTERNAL FUNCTION "global_function" -; CHECK-DAG: [[NS]] EXTERNAL TYPE "ns" -; CHECK-DAG: [[MEM_FUNC]] EXTERNAL FUNCTION "C::member_function" -; CHECK-DAG: [[GLOB_VAR]] EXTERNAL VARIABLE "global_variable" -; CHECK-DAG: [[GLOB_NS_VAR]] EXTERNAL VARIABLE "ns::global_namespace_variable" -; CHECK-DAG: [[GLOB_NS_FUNC]] EXTERNAL FUNCTION "ns::global_namespace_function" -; CHECK-DAG: [[D_VAR]] EXTERNAL VARIABLE "ns::d" -; CHECK-DAG: [[STATIC_MEM_VAR]] EXTERNAL VARIABLE "C::static_member_variable" -; CHECK-DAG: [[STATIC_MEM_FUNC]] EXTERNAL FUNCTION "C::static_member_function" -; CHECK-DAG: [[ANON]] EXTERNAL TYPE "(anonymous namespace)" -; CHECK-DAG: [[ANON_INNER]] EXTERNAL TYPE "(anonymous namespace)::inner" -; CHECK-DAG: [[OUTER]] EXTERNAL TYPE "outer" -; CHECK-DAG: [[OUTER_ANON]] EXTERNAL TYPE "outer::(anonymous namespace)" -; CHECK-DAG: [[ANON_I]] STATIC VARIABLE "(anonymous namespace)::i" -; CHECK-DAG: [[ANON_INNER_B]] STATIC VARIABLE "(anonymous namespace)::inner::b" -; CHECK-DAG: [[OUTER_ANON_C]] STATIC VARIABLE "outer::(anonymous namespace)::c" - +; CHECK-NEXT: [[GLOBAL_FUNC]] EXTERNAL FUNCTION "global_function" +; CHECK-NEXT: [[NS]] EXTERNAL TYPE "ns" +; CHECK-NEXT: [[OUTER_ANON_C]] STATIC VARIABLE "outer::(anonymous namespace)::c" +; CHECK-NEXT: [[ANON_I]] STATIC VARIABLE "(anonymous namespace)::i" ; GCC Doesn't put local statics in pubnames, but it seems not unreasonable and ; comes out naturally from LLVM's implementation, so I'm OK with it for now. If ; it's demonstrated that this is a major size concern or degrades debug info ; consumer behavior, feel free to change it. +; CHECK-NEXT: [[F3_Z]] STATIC VARIABLE "f3::z" +; CHECK-NEXT: [[ANON]] EXTERNAL TYPE "(anonymous namespace)" +; CHECK-NEXT: [[OUTER_ANON]] EXTERNAL TYPE "outer::(anonymous namespace)" +; CHECK-NEXT: [[ANON_INNER_B]] STATIC VARIABLE "(anonymous namespace)::inner::b" +; CHECK-NEXT: [[OUTER]] EXTERNAL TYPE "outer" +; CHECK-NEXT: [[MEM_FUNC]] EXTERNAL FUNCTION "C::member_function" +; CHECK-NEXT: [[GLOB_VAR]] EXTERNAL VARIABLE "global_variable" +; CHECK-NEXT: [[GLOB_NS_VAR]] EXTERNAL VARIABLE "ns::global_namespace_variable" +; CHECK-NEXT: [[ANON_INNER]] EXTERNAL TYPE "(anonymous namespace)::inner" +; CHECK-NEXT: [[D_VAR]] EXTERNAL VARIABLE "ns::d" +; CHECK-NEXT: [[GLOB_NS_FUNC]] EXTERNAL FUNCTION "ns::global_namespace_function" +; CHECK-NEXT: [[STATIC_MEM_VAR]] EXTERNAL VARIABLE "C::static_member_variable" +; CHECK-NEXT: [[STATIC_MEM_FUNC]] EXTERNAL FUNCTION "C::static_member_function" -; CHECK-DAG: [[F3_Z]] STATIC VARIABLE "f3::z" ; CHECK-LABEL: debug_gnu_pubtypes contents: @@ -214,10 +244,10 @@ define void @_ZN1C15member_functionEv(%struct.C* %this) #0 align 2 { entry: %this.addr = alloca %struct.C*, align 8 store %struct.C* %this, %struct.C** %this.addr, align 8 - call void @llvm.dbg.declare(metadata %struct.C** %this.addr, metadata !50, metadata !MDExpression()), !dbg !52 + call void @llvm.dbg.declare(metadata %struct.C** %this.addr, metadata !51, metadata !53), !dbg !54 %this1 = load %struct.C*, %struct.C** %this.addr - store i32 0, i32* @_ZN1C22static_member_variableE, align 4, !dbg !53 - ret void, !dbg !54 + store i32 0, i32* @_ZN1C22static_member_variableE, align 4, !dbg !55 + ret void, !dbg !56 } ; Function Attrs: nounwind readnone @@ -226,108 +256,110 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 ; Function Attrs: nounwind uwtable define i32 @_ZN1C22static_member_functionEv() #0 align 2 { entry: - %0 = load i32, i32* @_ZN1C22static_member_variableE, align 4, !dbg !55 - ret i32 %0, !dbg !55 + %0 = load i32, i32* @_ZN1C22static_member_variableE, align 4, !dbg !57 + ret i32 %0, !dbg !57 } ; Function Attrs: nounwind uwtable define i32 @_Z15global_functionv() #0 { entry: - ret i32 -1, !dbg !56 + ret i32 -1, !dbg !58 } ; Function Attrs: nounwind uwtable define void @_ZN2ns25global_namespace_functionEv() #0 { entry: - call void @_ZN1C15member_functionEv(%struct.C* @global_variable), !dbg !57 - ret void, !dbg !58 + call void @_ZN1C15member_functionEv(%struct.C* @global_variable), !dbg !59 + ret void, !dbg !60 } ; Function Attrs: nounwind uwtable define i32* @_Z2f3v() #0 { entry: - ret i32* @_ZZ2f3vE1z, !dbg !59 + ret i32* @_ZZ2f3vE1z, !dbg !61 } ; Function Attrs: nounwind uwtable define i32 @_Z2f7v() #0 { entry: - %0 = load i32, i32* @_ZN12_GLOBAL__N_11iE, align 4, !dbg !60 - %call = call i32* @_Z2f3v(), !dbg !60 - %1 = load i32, i32* %call, align 4, !dbg !60 - %add = add nsw i32 %0, %1, !dbg !60 - %2 = load i32, i32* @_ZN12_GLOBAL__N_15inner1bE, align 4, !dbg !60 - %add1 = add nsw i32 %add, %2, !dbg !60 - %3 = load i32, i32* @_ZN5outer12_GLOBAL__N_11cE, align 4, !dbg !60 - %add2 = add nsw i32 %add1, %3, !dbg !60 - ret i32 %add2, !dbg !60 + %0 = load i32, i32* @_ZN12_GLOBAL__N_11iE, align 4, !dbg !62 + %call = call i32* @_Z2f3v(), !dbg !62 + %1 = load i32, i32* %call, align 4, !dbg !62 + %add = add nsw i32 %0, %1, !dbg !62 + %2 = load i32, i32* @_ZN12_GLOBAL__N_15inner1bE, align 4, !dbg !62 + %add1 = add nsw i32 %add, %2, !dbg !62 + %3 = load i32, i32* @_ZN5outer12_GLOBAL__N_11cE, align 4, !dbg !62 + %add2 = add nsw i32 %add1, %3, !dbg !62 + ret i32 %add2, !dbg !62 } -attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" } +attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "unsafe-fp-math"="false" "use-soft-float"="false" } attributes #1 = { nounwind readnone } !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!47, !48} -!llvm.ident = !{!49} +!llvm.module.flags = !{!48, !49} +!llvm.ident = !{!50} -!0 = !MDCompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: 1, file: !1, enums: !2, retainedTypes: !3, subprograms: !19, globals: !32, imports: !45) -!1 = !MDFile(filename: "pubnames.cpp", directory: "/tmp/dbginfo") +!0 = !MDCompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.7.0 (trunk 234897) (llvm/trunk 234911)", isOptimized: false, runtimeVersion: 0, emissionKind: 1, enums: !2, retainedTypes: !3, subprograms: !19, globals: !31, imports: !44) +!1 = !MDFile(filename: "gnu-public-names.cpp", directory: "/tmp/dbginfo") !2 = !{} !3 = !{!4, !15} -!4 = !MDCompositeType(tag: DW_TAG_structure_type, name: "C", line: 1, size: 8, align: 8, file: !1, elements: !5, identifier: "_ZTS1C") +!4 = !MDCompositeType(tag: DW_TAG_structure_type, name: "C", file: !1, line: 1, size: 8, align: 8, elements: !5, identifier: "_ZTS1C") !5 = !{!6, !8, !12} -!6 = !MDDerivedType(tag: DW_TAG_member, name: "static_member_variable", line: 4, flags: DIFlagStaticMember, file: !1, scope: !"_ZTS1C", baseType: !7) -!7 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!8 = !MDSubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !"_ZTS1C", type: !9) +!6 = !MDDerivedType(tag: DW_TAG_member, name: "static_member_variable", scope: !"_ZTS1C", file: !1, line: 4, baseType: !7, flags: DIFlagStaticMember) +!7 = !MDBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) +!8 = !MDSubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", scope: !"_ZTS1C", file: !1, line: 2, type: !9, isLocal: false, isDefinition: false, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: false) !9 = !MDSubroutineType(types: !10) !10 = !{null, !11} -!11 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1C") -!12 = !MDSubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !"_ZTS1C", type: !13) +!11 = !MDDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS1C", size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer) +!12 = !MDSubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", scope: !"_ZTS1C", file: !1, line: 3, type: !13, isLocal: false, isDefinition: false, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false) !13 = !MDSubroutineType(types: !14) !14 = !{!7} -!15 = !MDCompositeType(tag: DW_TAG_structure_type, name: "D", line: 28, size: 32, align: 32, file: !1, scope: !16, elements: !17, identifier: "_ZTSN2ns1DE") -!16 = !MDNamespace(name: "ns", line: 23, file: !1, scope: null) +!15 = !MDCompositeType(tag: DW_TAG_structure_type, name: "D", scope: !16, file: !1, line: 29, size: 32, align: 32, elements: !17, identifier: "_ZTSN2ns1DE") +!16 = !MDNamespace(name: "ns", scope: null, file: !1, line: 23) !17 = !{!18} -!18 = !MDDerivedType(tag: DW_TAG_member, name: "A", line: 29, size: 32, align: 32, file: !1, scope: !"_ZTSN2ns1DE", baseType: !7) -!19 = !{!20, !21, !22, !24, !27, !31} -!20 = !MDSubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", line: 9, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 9, file: !1, scope: !"_ZTS1C", type: !9, function: void (%struct.C*)* @_ZN1C15member_functionEv, declaration: !8, variables: !2) -!21 = !MDSubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 13, file: !1, scope: !"_ZTS1C", type: !13, function: i32 ()* @_ZN1C22static_member_functionEv, declaration: !12, variables: !2) -!22 = !MDSubprogram(name: "global_function", linkageName: "_Z15global_functionv", line: 19, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 19, file: !1, scope: !23, type: !13, function: i32 ()* @_Z15global_functionv, variables: !2) -!23 = !MDFile(filename: "pubnames.cpp", directory: "/tmp/dbginfo") -!24 = !MDSubprogram(name: "global_namespace_function", linkageName: "_ZN2ns25global_namespace_functionEv", line: 24, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 24, file: !1, scope: !16, type: !25, function: void ()* @_ZN2ns25global_namespace_functionEv, variables: !2) -!25 = !MDSubroutineType(types: !26) -!26 = !{null} -!27 = !MDSubprogram(name: "f3", linkageName: "_Z2f3v", line: 37, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 37, file: !1, scope: !23, type: !28, function: i32* ()* @_Z2f3v, variables: !2) -!28 = !MDSubroutineType(types: !29) -!29 = !{!30} -!30 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !7) -!31 = !MDSubprogram(name: "f7", linkageName: "_Z2f7v", line: 54, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 54, file: !1, scope: !23, type: !13, function: i32 ()* @_Z2f7v, variables: !2) -!32 = !{!33, !34, !35, !36, !37, !38, !41, !44} -!33 = !MDGlobalVariable(name: "static_member_variable", linkageName: "_ZN1C22static_member_variableE", line: 7, isLocal: false, isDefinition: true, scope: null, file: !23, type: !7, variable: i32* @_ZN1C22static_member_variableE, declaration: !6) -!34 = !MDGlobalVariable(name: "global_variable", line: 17, isLocal: false, isDefinition: true, scope: null, file: !23, type: !"_ZTS1C", variable: %struct.C* @global_variable) -!35 = !MDGlobalVariable(name: "global_namespace_variable", linkageName: "_ZN2ns25global_namespace_variableE", line: 27, isLocal: false, isDefinition: true, scope: !16, file: !23, type: !7, variable: i32* @_ZN2ns25global_namespace_variableE) -!36 = !MDGlobalVariable(name: "d", linkageName: "_ZN2ns1dE", line: 30, isLocal: false, isDefinition: true, scope: !16, file: !23, type: !"_ZTSN2ns1DE", variable: %"struct.ns::D"* @_ZN2ns1dE) -!37 = !MDGlobalVariable(name: "z", line: 38, isLocal: true, isDefinition: true, scope: !27, file: !23, type: !7, variable: i32* @_ZZ2f3vE1z) -!38 = !MDGlobalVariable(name: "c", linkageName: "_ZN5outer12_GLOBAL__N_11cE", line: 50, isLocal: true, isDefinition: true, scope: !39, file: !23, type: !7, variable: i32* @_ZN5outer12_GLOBAL__N_11cE) -!39 = !MDNamespace(line: 49, file: !1, scope: !40) -!40 = !MDNamespace(name: "outer", line: 48, file: !1, scope: null) -!41 = !MDGlobalVariable(name: "b", linkageName: "_ZN12_GLOBAL__N_15inner1bE", line: 44, isLocal: true, isDefinition: true, scope: !42, file: !23, type: !7, variable: i32* @_ZN12_GLOBAL__N_15inner1bE) -!42 = !MDNamespace(name: "inner", line: 43, file: !1, scope: !43) -!43 = !MDNamespace(line: 33, file: !1, scope: null) -!44 = !MDGlobalVariable(name: "i", linkageName: "_ZN12_GLOBAL__N_11iE", line: 34, isLocal: true, isDefinition: true, scope: !43, file: !23, type: !7, variable: i32* @_ZN12_GLOBAL__N_11iE) -!45 = !{!46} -!46 = !MDImportedEntity(tag: DW_TAG_imported_module, line: 40, scope: !40, entity: !39) -!47 = !{i32 2, !"Dwarf Version", i32 4} -!48 = !{i32 2, !"Debug Info Version", i32 3} -!49 = !{!"clang version 3.5.0 "} -!50 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !20, type: !51) -!51 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !"_ZTS1C") -!52 = !MDLocation(line: 0, scope: !20) -!53 = !MDLocation(line: 10, scope: !20) -!54 = !MDLocation(line: 11, scope: !20) -!55 = !MDLocation(line: 14, scope: !21) -!56 = !MDLocation(line: 20, scope: !22) -!57 = !MDLocation(line: 25, scope: !24) -!58 = !MDLocation(line: 26, scope: !24) -!59 = !MDLocation(line: 39, scope: !27) -!60 = !MDLocation(line: 55, scope: !31) +!18 = !MDDerivedType(tag: DW_TAG_member, name: "A", scope: !"_ZTSN2ns1DE", file: !1, line: 30, baseType: !7, size: 32, align: 32) +!19 = !{!20, !21, !22, !23, !26, !30} +!20 = !MDSubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", scope: !"_ZTS1C", file: !1, line: 9, type: !9, isLocal: false, isDefinition: true, scopeLine: 9, flags: DIFlagPrototyped, isOptimized: false, function: void (%struct.C*)* @_ZN1C15member_functionEv, declaration: !8, variables: !2) +!21 = !MDSubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", scope: !"_ZTS1C", file: !1, line: 13, type: !13, isLocal: false, isDefinition: true, scopeLine: 13, flags: DIFlagPrototyped, isOptimized: false, function: i32 ()* @_ZN1C22static_member_functionEv, declaration: !12, variables: !2) +!22 = !MDSubprogram(name: "global_function", linkageName: "_Z15global_functionv", scope: !1, file: !1, line: 19, type: !13, isLocal: false, isDefinition: true, scopeLine: 19, flags: DIFlagPrototyped, isOptimized: false, function: i32 ()* @_Z15global_functionv, variables: !2) +!23 = !MDSubprogram(name: "global_namespace_function", linkageName: "_ZN2ns25global_namespace_functionEv", scope: !16, file: !1, line: 24, type: !24, isLocal: false, isDefinition: true, scopeLine: 24, flags: DIFlagPrototyped, isOptimized: false, function: void ()* @_ZN2ns25global_namespace_functionEv, variables: !2) +!24 = !MDSubroutineType(types: !25) +!25 = !{null} +!26 = !MDSubprogram(name: "f3", linkageName: "_Z2f3v", scope: !1, file: !1, line: 40, type: !27, isLocal: false, isDefinition: true, scopeLine: 40, flags: DIFlagPrototyped, isOptimized: false, function: i32* ()* @_Z2f3v, variables: !2) +!27 = !MDSubroutineType(types: !28) +!28 = !{!29} +!29 = !MDDerivedType(tag: DW_TAG_pointer_type, baseType: !7, size: 64, align: 64) +!30 = !MDSubprogram(name: "f7", linkageName: "_Z2f7v", scope: !1, file: !1, line: 57, type: !13, isLocal: false, isDefinition: true, scopeLine: 57, flags: DIFlagPrototyped, isOptimized: false, function: i32 ()* @_Z2f7v, variables: !2) +!31 = !{!32, !33, !34, !35, !36, !37, !39, !41} +!32 = !MDGlobalVariable(name: "static_member_variable", linkageName: "_ZN1C22static_member_variableE", scope: !0, file: !1, line: 7, type: !7, isLocal: false, isDefinition: true, variable: i32* @_ZN1C22static_member_variableE, declaration: !6) +!33 = !MDGlobalVariable(name: "global_variable", scope: !0, file: !1, line: 17, type: !"_ZTS1C", isLocal: false, isDefinition: true, variable: %struct.C* @global_variable) +!34 = !MDGlobalVariable(name: "global_namespace_variable", linkageName: "_ZN2ns25global_namespace_variableE", scope: !16, file: !1, line: 27, type: !7, isLocal: false, isDefinition: true, variable: i32* @_ZN2ns25global_namespace_variableE) +!35 = !MDGlobalVariable(name: "d", linkageName: "_ZN2ns1dE", scope: !16, file: !1, line: 31, type: !"_ZTSN2ns1DE", isLocal: false, isDefinition: true, variable: %"struct.ns::D"* @_ZN2ns1dE) +!36 = !MDGlobalVariable(name: "z", scope: !26, file: !1, line: 41, type: !7, isLocal: true, isDefinition: true, variable: i32* @_ZZ2f3vE1z) +!37 = !MDGlobalVariable(name: "i", linkageName: "_ZN12_GLOBAL__N_11iE", scope: !38, file: !1, line: 37, type: !7, isLocal: true, isDefinition: true, variable: i32* @_ZN12_GLOBAL__N_11iE) +!38 = !MDNamespace(scope: null, file: !1, line: 36) +!39 = !MDGlobalVariable(name: "b", linkageName: "_ZN12_GLOBAL__N_15inner1bE", scope: !40, file: !1, line: 47, type: !7, isLocal: true, isDefinition: true, variable: i32* @_ZN12_GLOBAL__N_15inner1bE) +!40 = !MDNamespace(name: "inner", scope: !38, file: !1, line: 46) +!41 = !MDGlobalVariable(name: "c", linkageName: "_ZN5outer12_GLOBAL__N_11cE", scope: !42, file: !1, line: 53, type: !7, isLocal: true, isDefinition: true, variable: i32* @_ZN5outer12_GLOBAL__N_11cE) +!42 = !MDNamespace(scope: !43, file: !1, line: 52) +!43 = !MDNamespace(name: "outer", scope: null, file: !1, line: 51) +!44 = !{!45, !47} +!45 = !MDImportedEntity(tag: DW_TAG_imported_declaration, scope: !0, entity: !46, line: 34) +!46 = !MDGlobalVariable(name: "global_namespace_variable_decl", linkageName: "_ZN2ns30global_namespace_variable_declE", scope: !16, file: !1, line: 28, type: !7, isLocal: false, isDefinition: false) +!47 = !MDImportedEntity(tag: DW_TAG_imported_module, scope: !43, entity: !42, line: 43) +!48 = !{i32 2, !"Dwarf Version", i32 4} +!49 = !{i32 2, !"Debug Info Version", i32 3} +!50 = !{!"clang version 3.7.0 (trunk 234897) (llvm/trunk 234911)"} +!51 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, scope: !20, type: !52, flags: DIFlagArtificial | DIFlagObjectPointer) +!52 = !MDDerivedType(tag: DW_TAG_pointer_type, baseType: !"_ZTS1C", size: 64, align: 64) +!53 = !MDExpression() +!54 = !MDLocation(line: 0, scope: !20) +!55 = !MDLocation(line: 10, scope: !20) +!56 = !MDLocation(line: 11, scope: !20) +!57 = !MDLocation(line: 14, scope: !21) +!58 = !MDLocation(line: 20, scope: !22) +!59 = !MDLocation(line: 25, scope: !23) +!60 = !MDLocation(line: 26, scope: !23) +!61 = !MDLocation(line: 42, scope: !26) +!62 = !MDLocation(line: 58, scope: !30) diff --git a/test/DebugInfo/X86/inline-member-function.ll b/test/DebugInfo/X86/inline-member-function.ll index e5a4ff0..c1a367e 100644 --- a/test/DebugInfo/X86/inline-member-function.ll +++ b/test/DebugInfo/X86/inline-member-function.ll @@ -71,12 +71,11 @@ attributes #1 = { nounwind readnone } !3 = !{!4} !4 = !MDCompositeType(tag: DW_TAG_structure_type, name: "foo", line: 1, size: 8, align: 8, file: !1, elements: !5, identifier: "_ZTS3foo") !5 = !{!6} -!6 = !MDSubprogram(name: "func", linkageName: "_ZN3foo4funcEi", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !"_ZTS3foo", type: !7, variables: !11) +!6 = !MDSubprogram(name: "func", linkageName: "_ZN3foo4funcEi", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !"_ZTS3foo", type: !7) !7 = !MDSubroutineType(types: !8) !8 = !{!9, !10, !9} !9 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !10 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS3foo") -!11 = !{i32 786468} !12 = !{!13, !17} !13 = !MDSubprogram(name: "main", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 7, file: !1, scope: !14, type: !15, function: i32 ()* @main, variables: !2) !14 = !MDFile(filename: "inline.cpp", directory: "/tmp/dbginfo") diff --git a/test/DebugInfo/X86/inlined-formal-parameter.ll b/test/DebugInfo/X86/inlined-formal-parameter.ll new file mode 100644 index 0000000..a2ae0df --- /dev/null +++ b/test/DebugInfo/X86/inlined-formal-parameter.ll @@ -0,0 +1,75 @@ +; RUN: llc -filetype=obj -o %t.o %s +; RUN: llvm-dwarfdump -debug-dump=info %t.o | FileCheck %s + +; Testcase generated using 'clang -g -O2 -S -emit-llvm' from the following: +;; void sink(void); +;; static __attribute__((always_inline)) void bar(int a) { sink(); } +;; void foo(void) { +;; bar(0); +;; bar(0); +;; } + +; Check that we have formal parameters for 'a' in both inlined subroutines. +; CHECK: DW_TAG_inlined_subroutine +; CHECK-NEXT: DW_AT_abstract_origin {{.*}} "bar" +; CHECK: DW_TAG_formal_parameter +; CHECK-NEXT: DW_AT_const_value +; CHECK-NEXT: DW_AT_abstract_origin {{.*}} "a" +; CHECK: DW_TAG_inlined_subroutine +; CHECK-NEXT: DW_AT_abstract_origin {{.*}} "bar" +; CHECK: DW_TAG_formal_parameter +; CHECK-NEXT: DW_AT_const_value +; CHECK-NEXT: DW_AT_abstract_origin {{.*}} "a" + +target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-apple-darwin" + +; Function Attrs: nounwind ssp uwtable +define void @foo() #0 { +entry: + tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !12, metadata !17) #3, !dbg !18 + tail call void @sink() #3, !dbg !20 + tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !12, metadata !17) #3, !dbg !21 + tail call void @sink() #3, !dbg !23 + ret void, !dbg !24 +} + +declare void @sink() #1 + +; Function Attrs: nounwind readnone +declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #2 + +attributes #0 = { nounwind ssp uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="core2" "unsafe-fp-math"="false" "use-soft-float"="false" } +attributes #1 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="core2" "unsafe-fp-math"="false" "use-soft-float"="false" } +attributes #2 = { nounwind readnone } +attributes #3 = { nounwind } + +!llvm.dbg.cu = !{!0} +!llvm.module.flags = !{!13, !14, !15} +!llvm.ident = !{!16} + +!0 = !MDCompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 235110) (llvm/trunk 235108)", isOptimized: true, runtimeVersion: 0, emissionKind: 1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!1 = !MDFile(filename: "t.c", directory: "/path/to/dir") +!2 = !{} +!3 = !{!4, !7} +!4 = !MDSubprogram(name: "foo", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: true, function: void ()* @foo, variables: !2) +!5 = !MDSubroutineType(types: !6) +!6 = !{null} +!7 = !MDSubprogram(name: "bar", scope: !1, file: !1, line: 2, type: !8, isLocal: true, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, variables: !11) +!8 = !MDSubroutineType(types: !9) +!9 = !{null, !10} +!10 = !MDBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) +!11 = !{!12} +!12 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "a", arg: 1, scope: !7, file: !1, line: 2, type: !10) +!13 = !{i32 2, !"Dwarf Version", i32 2} +!14 = !{i32 2, !"Debug Info Version", i32 3} +!15 = !{i32 1, !"PIC Level", i32 2} +!16 = !{!"clang version 3.7.0 (trunk 235110) (llvm/trunk 235108)"} +!17 = !MDExpression() +!18 = !MDLocation(line: 2, column: 52, scope: !7, inlinedAt: !19) +!19 = distinct !MDLocation(line: 4, column: 3, scope: !4) +!20 = !MDLocation(line: 2, column: 57, scope: !7, inlinedAt: !19) +!21 = !MDLocation(line: 2, column: 52, scope: !7, inlinedAt: !22) +!22 = distinct !MDLocation(line: 5, column: 3, scope: !4) +!23 = !MDLocation(line: 2, column: 57, scope: !7, inlinedAt: !22) +!24 = !MDLocation(line: 6, column: 1, scope: !4) diff --git a/test/DebugInfo/X86/mi-print.ll b/test/DebugInfo/X86/mi-print.ll new file mode 100644 index 0000000..26dd0cb --- /dev/null +++ b/test/DebugInfo/X86/mi-print.ll @@ -0,0 +1,56 @@ +; RUN: llc -debug -mtriple x86_64-apple-darwin < %s -o /dev/null 2>&1 | FileCheck %s +; REQUIRES: asserts +; Check that llc -debug actually prints variables and locations, rather than +; crashing. + +; CHECK: DBG_VALUE + +; Generated using `clang -g -O2 -S -emit-llvm -g` on the following source: +; +; static int foo(int x) { return x; } +; int bar(int x) { return foo(x); } + +target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-apple-macosx10.10.0" + +; Function Attrs: nounwind readnone ssp uwtable +define i32 @bar(i32 %x) #0 { +entry: + tail call void @llvm.dbg.value(metadata i32 %x, i64 0, metadata !9, metadata !17), !dbg !18 + tail call void @llvm.dbg.value(metadata i32 %x, i64 0, metadata !19, metadata !17), !dbg !21 + ret i32 %x, !dbg !22 +} + +; Function Attrs: nounwind readnone +declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #1 + +attributes #0 = { nounwind readnone ssp uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="core2" "unsafe-fp-math"="false" "use-soft-float"="false" } +attributes #1 = { nounwind readnone } + +!llvm.dbg.cu = !{!0} +!llvm.module.flags = !{!13, !14, !15} +!llvm.ident = !{!16} + +!0 = !MDCompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 233919) (llvm/trunk 233920)", isOptimized: true, runtimeVersion: 0, emissionKind: 1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!1 = !MDFile(filename: "t.c", directory: "/Users/dexonsmith/data/llvm/debug-info/test/DebugInfo/X86") +!2 = !{} +!3 = !{!4, !10} +!4 = !MDSubprogram(name: "bar", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, function: i32 (i32)* @bar, variables: !8) +!5 = !MDSubroutineType(types: !6) +!6 = !{!7, !7} +!7 = !MDBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) +!8 = !{!9} +!9 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "x", arg: 1, scope: !4, file: !1, line: 2, type: !7) +!10 = !MDSubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !5, isLocal: true, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, variables: !11) +!11 = !{!12} +!12 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "x", arg: 1, scope: !10, file: !1, line: 1, type: !7) +!13 = !{i32 2, !"Dwarf Version", i32 2} +!14 = !{i32 2, !"Debug Info Version", i32 3} +!15 = !{i32 1, !"PIC Level", i32 2} +!16 = !{!"clang version 3.7.0 (trunk 233919) (llvm/trunk 233920)"} +!17 = !MDExpression() +!18 = !MDLocation(line: 2, column: 13, scope: !4) +!19 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "x", arg: 1, scope: !10, file: !1, line: 1, type: !7) +!20 = distinct !MDLocation(line: 2, column: 25, scope: !4) +!21 = !MDLocation(line: 1, column: 20, scope: !10, inlinedAt: !20) +!22 = !MDLocation(line: 2, column: 18, scope: !4) diff --git a/test/DebugInfo/X86/nodebug_with_debug_loc.ll b/test/DebugInfo/X86/nodebug_with_debug_loc.ll index ba19f23..e4fb062 100644 --- a/test/DebugInfo/X86/nodebug_with_debug_loc.ll +++ b/test/DebugInfo/X86/nodebug_with_debug_loc.ll @@ -124,7 +124,7 @@ attributes #3 = { nounwind } !24 = !{i32 2, !"Debug Info Version", i32 3} !25 = !{!"clang version 3.5.0 "} !26 = !MDLocation(line: 15, scope: !11) -!27 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "lhs", line: 13, arg: 1, scope: !17, file: !12, type: !20, inlinedAt: !28) +!27 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "lhs", line: 13, arg: 1, scope: !17, file: !12, type: !20) !28 = !MDLocation(line: 16, scope: !11) !29 = !MDLocation(line: 13, scope: !17, inlinedAt: !28) !30 = !MDLocation(line: 17, scope: !11) diff --git a/test/DebugInfo/X86/nondefault-subrange-array.ll b/test/DebugInfo/X86/nondefault-subrange-array.ll index f08efc1..172bacb 100644 --- a/test/DebugInfo/X86/nondefault-subrange-array.ll +++ b/test/DebugInfo/X86/nondefault-subrange-array.ll @@ -42,11 +42,9 @@ !11 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !12 = !{!13} !13 = !MDSubrange(count: 42, lowerBound: -3) -!14 = !MDSubprogram(name: "A", line: 1, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !6, scope: !7, type: !15, variables: !18) +!14 = !MDSubprogram(name: "A", line: 1, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !6, scope: !7, type: !15) !15 = !MDSubroutineType(types: !16) !16 = !{null, !17} !17 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !7) -!18 = !{!19} -!19 = !{} ; previously: invalid DW_TAG_base_type !20 = !MDFile(filename: "t.cpp", directory: "/Volumes/Sandbox/llvm") !21 = !{i32 1, !"Debug Info Version", i32 3} diff --git a/test/DebugInfo/X86/nophysreg.ll b/test/DebugInfo/X86/nophysreg.ll index 65fd494..22394c8 100644 --- a/test/DebugInfo/X86/nophysreg.ll +++ b/test/DebugInfo/X86/nophysreg.ll @@ -196,7 +196,7 @@ attributes #3 = { ssp uwtable } !57 = !MDLocation(line: 23, column: 15, scope: !24) !58 = !MDLocation(line: 23, column: 7, scope: !24) !59 = !MDLocation(line: 24, column: 9, scope: !24) -!60 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "p5", line: 7, arg: 1, scope: !11, file: !12, type: !"_ZTS1A", inlinedAt: !61) +!60 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "p5", line: 7, arg: 1, scope: !11, file: !12, type: !"_ZTS1A") !61 = distinct !MDLocation(line: 26, column: 7, scope: !24) !62 = !MDLocation(line: 7, column: 42, scope: !11, inlinedAt: !61) !63 = !MDLocation(line: 7, column: 48, scope: !11, inlinedAt: !61) diff --git a/test/DebugInfo/X86/parameters.ll b/test/DebugInfo/X86/parameters.ll index a100181..419732f 100644 --- a/test/DebugInfo/X86/parameters.ll +++ b/test/DebugInfo/X86/parameters.ll @@ -92,13 +92,12 @@ attributes #2 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "n !7 = !{!8, !8} !8 = !MDCompositeType(tag: DW_TAG_structure_type, name: "foo", line: 2, size: 8, align: 8, file: !1, scope: !5, elements: !9) !9 = !{!10} -!10 = !MDSubprogram(name: "foo", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !8, type: !11, variables: !16) +!10 = !MDSubprogram(name: "foo", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !8, type: !11) !11 = !MDSubroutineType(types: !12) !12 = !{null, !13, !14} !13 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !8) !14 = !MDDerivedType(tag: DW_TAG_reference_type, baseType: !15) !15 = !MDDerivedType(tag: DW_TAG_const_type, baseType: !8) -!16 = !{i32 786468} !17 = !MDSubprogram(name: "func2", linkageName: "_ZN7pr147635func2EbNS_3fooE", line: 12, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 12, file: !1, scope: !5, type: !18, function: void (i1, %"struct.pr14763::foo"*)* @_ZN7pr147635func2EbNS_3fooE, variables: !2) !18 = !MDSubroutineType(types: !19) !19 = !{null, !20, !8} diff --git a/test/DebugInfo/X86/pr11300.ll b/test/DebugInfo/X86/pr11300.ll index 8b9f155..aff26f9 100644 --- a/test/DebugInfo/X86/pr11300.ll +++ b/test/DebugInfo/X86/pr11300.ll @@ -48,14 +48,10 @@ entry: !9 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !10) !10 = !MDCompositeType(tag: DW_TAG_class_type, name: "foo", line: 1, size: 8, align: 8, file: !32, elements: !11) !11 = !{!12} -!12 = !MDSubprogram(name: "bar", linkageName: "_ZN3foo3barEv", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !6, scope: !10, type: !13, variables: !16) +!12 = !MDSubprogram(name: "bar", linkageName: "_ZN3foo3barEv", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !6, scope: !10, type: !13) !13 = !MDSubroutineType(types: !14) !14 = !{null, !15} !15 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, baseType: !10) -!16 = !{!17} -!17 = !{} ; previously: invalid DW_TAG_base_type -!18 = !{!19} -!19 = !{} ; previously: invalid DW_TAG_base_type !20 = !MDSubprogram(name: "bar", linkageName: "_ZN3foo3barEv", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !6, scope: null, type: !13, function: void (%struct.foo*)* @_ZN3foo3barEv, declaration: !12) !23 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 4, arg: 1, scope: !5, file: !6, type: !9) !24 = !MDLocation(line: 4, column: 15, scope: !5) diff --git a/test/DebugInfo/X86/pr12831.ll b/test/DebugInfo/X86/pr12831.ll index d552f7b..887110f 100644 --- a/test/DebugInfo/X86/pr12831.ll +++ b/test/DebugInfo/X86/pr12831.ll @@ -92,96 +92,70 @@ entry: !13 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !14) !14 = !MDCompositeType(tag: DW_TAG_class_type, name: "BPLModuleWriter", line: 12, size: 8, align: 8, file: !160, elements: !15) !15 = !{!16} -!16 = !MDSubprogram(name: "writeIntrinsic", linkageName: "_ZN15BPLModuleWriter14writeIntrinsicE8functionIFvvEE", line: 13, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 13, file: !6, scope: !14, type: !17, variables: !101) +!16 = !MDSubprogram(name: "writeIntrinsic", linkageName: "_ZN15BPLModuleWriter14writeIntrinsicE8functionIFvvEE", line: 13, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 13, file: !6, scope: !14, type: !17) !17 = !MDSubroutineType(types: !18) !18 = !{null, !19, !20} !19 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, baseType: !14) !20 = !MDCompositeType(tag: DW_TAG_class_type, name: "function<void ()>", line: 6, size: 8, align: 8, file: !160, elements: !21, templateParams: !97) !21 = !{!22, !51, !58, !86, !92} -!22 = !MDSubprogram(name: "function<BPLFunctionWriter::<lambda at BPLFunctionWriter2.ii:20:36> >", line: 8, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 8, file: !6, scope: !20, type: !23, templateParams: !47, variables: !49) +!22 = !MDSubprogram(name: "function<BPLFunctionWriter::<lambda at BPLFunctionWriter2.ii:20:36> >", line: 8, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 8, file: !6, scope: !20, type: !23, templateParams: !47) !23 = !MDSubroutineType(types: !24) !24 = !{null, !25, !26} !25 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, baseType: !20) !26 = !MDCompositeType(tag: DW_TAG_class_type, line: 20, size: 8, align: 8, file: !160, scope: !5, elements: !27) !27 = !{!28, !35, !41} -!28 = !MDSubprogram(name: "operator()", line: 20, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 20, file: !6, scope: !26, type: !29, variables: !33) +!28 = !MDSubprogram(name: "operator()", line: 20, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 20, file: !6, scope: !26, type: !29) !29 = !MDSubroutineType(types: !30) !30 = !{null, !31} !31 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, baseType: !32) !32 = !MDDerivedType(tag: DW_TAG_const_type, baseType: !26) -!33 = !{!34} -!34 = !{} ; previously: invalid DW_TAG_base_type -!35 = !MDSubprogram(name: "~", line: 20, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 20, file: !6, scope: !26, type: !36, variables: !39) +!35 = !MDSubprogram(name: "~", line: 20, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 20, file: !6, scope: !26, type: !36) !36 = !MDSubroutineType(types: !37) !37 = !{null, !38} !38 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, baseType: !26) -!39 = !{!40} -!40 = !{} ; previously: invalid DW_TAG_base_type -!41 = !MDSubprogram(name: "", line: 20, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 20, file: !6, scope: !26, type: !42, variables: !45) +!41 = !MDSubprogram(name: "", line: 20, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 20, file: !6, scope: !26, type: !42) !42 = !MDSubroutineType(types: !43) !43 = !{null, !38, !44} !44 = !MDDerivedType(tag: DW_TAG_rvalue_reference_type, baseType: !26) -!45 = !{!46} -!46 = !{} ; previously: invalid DW_TAG_base_type !47 = !{!48} !48 = !MDTemplateTypeParameter(name: "_Functor", type: !26) -!49 = !{!50} -!50 = !{} ; previously: invalid DW_TAG_base_type -!51 = !MDSubprogram(name: "function<function<void ()> >", line: 8, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 8, file: !6, scope: !20, type: !52, templateParams: !54, variables: !56) +!51 = !MDSubprogram(name: "function<function<void ()> >", line: 8, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 8, file: !6, scope: !20, type: !52, templateParams: !54) !52 = !MDSubroutineType(types: !53) !53 = !{null, !25, !20} !54 = !{!55} !55 = !MDTemplateTypeParameter(name: "_Functor", type: !20) -!56 = !{!57} -!57 = !{} ; previously: invalid DW_TAG_base_type -!58 = !MDSubprogram(name: "function<BPLFunctionWriter::<lambda at BPLFunctionWriter2.ii:23:36> >", line: 8, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 8, file: !6, scope: !20, type: !59, templateParams: !82, variables: !84) +!58 = !MDSubprogram(name: "function<BPLFunctionWriter::<lambda at BPLFunctionWriter2.ii:23:36> >", line: 8, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 8, file: !6, scope: !20, type: !59, templateParams: !82) !59 = !MDSubroutineType(types: !60) !60 = !{null, !25, !61} !61 = !MDCompositeType(tag: DW_TAG_class_type, line: 23, size: 8, align: 8, file: !160, scope: !5, elements: !62) !62 = !{!63, !70, !76} -!63 = !MDSubprogram(name: "operator()", line: 23, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 23, file: !6, scope: !61, type: !64, variables: !68) +!63 = !MDSubprogram(name: "operator()", line: 23, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 23, file: !6, scope: !61, type: !64) !64 = !MDSubroutineType(types: !65) !65 = !{null, !66} !66 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, baseType: !67) !67 = !MDDerivedType(tag: DW_TAG_const_type, baseType: !61) -!68 = !{!69} -!69 = !{} ; previously: invalid DW_TAG_base_type -!70 = !MDSubprogram(name: "~", line: 23, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 23, file: !6, scope: !61, type: !71, variables: !74) +!70 = !MDSubprogram(name: "~", line: 23, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 23, file: !6, scope: !61, type: !71) !71 = !MDSubroutineType(types: !72) !72 = !{null, !73} !73 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, baseType: !61) -!74 = !{!75} -!75 = !{} ; previously: invalid DW_TAG_base_type -!76 = !MDSubprogram(name: "", line: 23, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 23, file: !6, scope: !61, type: !77, variables: !80) +!76 = !MDSubprogram(name: "", line: 23, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 23, file: !6, scope: !61, type: !77) !77 = !MDSubroutineType(types: !78) !78 = !{null, !73, !79} !79 = !MDDerivedType(tag: DW_TAG_rvalue_reference_type, baseType: !61) -!80 = !{!81} -!81 = !{} ; previously: invalid DW_TAG_base_type !82 = !{!83} !83 = !MDTemplateTypeParameter(name: "_Functor", type: !61) -!84 = !{!85} -!85 = !{} ; previously: invalid DW_TAG_base_type -!86 = !MDSubprogram(name: "function", line: 6, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 6, file: !6, scope: !20, type: !87, variables: !90) +!86 = !MDSubprogram(name: "function", line: 6, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 6, file: !6, scope: !20, type: !87) !87 = !MDSubroutineType(types: !88) !88 = !{null, !25, !89} !89 = !MDDerivedType(tag: DW_TAG_rvalue_reference_type, baseType: !20) -!90 = !{!91} -!91 = !{} ; previously: invalid DW_TAG_base_type -!92 = !MDSubprogram(name: "~function", line: 6, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 6, file: !6, scope: !20, type: !93, variables: !95) +!92 = !MDSubprogram(name: "~function", line: 6, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 6, file: !6, scope: !20, type: !93) !93 = !MDSubroutineType(types: !94) !94 = !{null, !25} -!95 = !{!96} -!96 = !{} ; previously: invalid DW_TAG_base_type !97 = !{!98} !98 = !MDTemplateTypeParameter(name: "T", type: !99) !99 = !MDSubroutineType(types: !100) !100 = !{null} -!101 = !{!102} -!102 = !{} ; previously: invalid DW_TAG_base_type -!103 = !MDSubprogram(name: "writeExpr", linkageName: "_ZN17BPLFunctionWriter9writeExprEv", line: 17, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrivate | DIFlagPrototyped, isOptimized: false, scopeLine: 17, file: !6, scope: !10, type: !7, variables: !104) -!104 = !{!105} -!105 = !{} ; previously: invalid DW_TAG_base_type +!103 = !MDSubprogram(name: "writeExpr", linkageName: "_ZN17BPLFunctionWriter9writeExprEv", line: 17, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrivate | DIFlagPrototyped, isOptimized: false, scopeLine: 17, file: !6, scope: !10, type: !7) !106 = !MDSubprogram(name: "function<BPLFunctionWriter::<lambda at BPLFunctionWriter2.ii:23:36> >", linkageName: "_ZN8functionIFvvEEC2IZN17BPLFunctionWriter9writeExprEvE3$_1_0EET_", line: 8, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 8, file: !6, scope: null, type: !59, function: void (%class.function*)* @"_ZN8functionIFvvEEC2IZN17BPLFunctionWriter9writeExprEvE3$_1_0EET_", templateParams: !82, declaration: !58, variables: !1) !107 = !MDSubprogram(name: "_M_not_empty_function<BPLFunctionWriter::<lambda at BPLFunctionWriter2.ii:23:36> >", linkageName: "_ZN13_Base_manager21_M_not_empty_functionIZN17BPLFunctionWriter9writeExprEvE3$_1_0EEvRKT_", line: 3, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !6, scope: null, type: !108, function: void (%class.anon.0*)* @"_ZN13_Base_manager21_M_not_empty_functionIZN17BPLFunctionWriter9writeExprEvE3$_1_0EEvRKT_", templateParams: !111, declaration: !113, variables: !1) !108 = !MDSubroutineType(types: !109) @@ -189,19 +163,15 @@ entry: !110 = !MDDerivedType(tag: DW_TAG_reference_type, baseType: !61) !111 = !{!112} !112 = !MDTemplateTypeParameter(name: "_Tp", type: !61) -!113 = !MDSubprogram(name: "_M_not_empty_function<BPLFunctionWriter::<lambda at BPLFunctionWriter2.ii:23:36> >", linkageName: "_ZN13_Base_manager21_M_not_empty_functionIZN17BPLFunctionWriter9writeExprEvE3$_1_0EEvRKT_", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !6, scope: !114, type: !108, templateParams: !111, variables: !124) +!113 = !MDSubprogram(name: "_M_not_empty_function<BPLFunctionWriter::<lambda at BPLFunctionWriter2.ii:23:36> >", linkageName: "_ZN13_Base_manager21_M_not_empty_functionIZN17BPLFunctionWriter9writeExprEvE3$_1_0EEvRKT_", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !6, scope: !114, type: !108, templateParams: !111) !114 = !MDCompositeType(tag: DW_TAG_class_type, name: "_Base_manager", line: 1, size: 8, align: 8, file: !160, elements: !115) !115 = !{!116, !113} -!116 = !MDSubprogram(name: "_M_not_empty_function<BPLFunctionWriter::<lambda at BPLFunctionWriter2.ii:20:36> >", linkageName: "_ZN13_Base_manager21_M_not_empty_functionIZN17BPLFunctionWriter9writeExprEvE3$_0EEvRKT_", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !6, scope: !114, type: !117, templateParams: !120, variables: !122) +!116 = !MDSubprogram(name: "_M_not_empty_function<BPLFunctionWriter::<lambda at BPLFunctionWriter2.ii:20:36> >", linkageName: "_ZN13_Base_manager21_M_not_empty_functionIZN17BPLFunctionWriter9writeExprEvE3$_0EEvRKT_", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !6, scope: !114, type: !117, templateParams: !120) !117 = !MDSubroutineType(types: !118) !118 = !{null, !119} !119 = !MDDerivedType(tag: DW_TAG_reference_type, baseType: !26) !120 = !{!121} !121 = !MDTemplateTypeParameter(name: "_Tp", type: !26) -!122 = !{!123} -!123 = !{} ; previously: invalid DW_TAG_base_type -!124 = !{!125} -!125 = !{} ; previously: invalid DW_TAG_base_type !126 = !MDSubprogram(name: "function<BPLFunctionWriter::<lambda at BPLFunctionWriter2.ii:20:36> >", linkageName: "_ZN8functionIFvvEEC2IZN17BPLFunctionWriter9writeExprEvE3$_0EET_", line: 8, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 8, file: !6, scope: null, type: !23, function: void (%class.function*)* @"_ZN8functionIFvvEEC2IZN17BPLFunctionWriter9writeExprEvE3$_0EET_", templateParams: !47, declaration: !22, variables: !1) !127 = !MDSubprogram(name: "_M_not_empty_function<BPLFunctionWriter::<lambda at BPLFunctionWriter2.ii:20:36> >", linkageName: "_ZN13_Base_manager21_M_not_empty_functionIZN17BPLFunctionWriter9writeExprEvE3$_0EEvRKT_", line: 3, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !6, scope: null, type: !117, function: void (%class.anon*)* @"_ZN13_Base_manager21_M_not_empty_functionIZN17BPLFunctionWriter9writeExprEvE3$_0EEvRKT_", templateParams: !120, declaration: !116, variables: !1) !128 = !{!130} diff --git a/test/DebugInfo/X86/recursive_inlining.ll b/test/DebugInfo/X86/recursive_inlining.ll index 0d734ee..e20be83 100644 --- a/test/DebugInfo/X86/recursive_inlining.ll +++ b/test/DebugInfo/X86/recursive_inlining.ll @@ -236,7 +236,7 @@ attributes #3 = { nounwind } !34 = !{!"any pointer", !35, i64 0} !35 = !{!"omnipotent char", !36, i64 0} !36 = !{!"Simple C/C++ TBAA"} -!37 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !22, type: !25, inlinedAt: !32) +!37 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !22, type: !25) !38 = !MDLocation(line: 0, scope: !22, inlinedAt: !32) !39 = !MDLocation(line: 8, scope: !22, inlinedAt: !32) !40 = !MDLocation(line: 9, scope: !41, inlinedAt: !32) @@ -256,7 +256,7 @@ attributes #3 = { nounwind } !54 = !MDLocation(line: 20, scope: !18, inlinedAt: !55) !55 = !MDLocation(line: 10, scope: !22) !56 = !MDLocation(line: 17, scope: !14, inlinedAt: !54) -!57 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !22, type: !25, inlinedAt: !56) +!57 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !22, type: !25) !58 = !MDLocation(line: 0, scope: !22, inlinedAt: !56) !59 = !MDLocation(line: 8, scope: !22, inlinedAt: !56) !60 = !MDLocation(line: 9, scope: !41, inlinedAt: !56) @@ -266,7 +266,7 @@ attributes #3 = { nounwind } !64 = !MDLocation(line: 16, scope: !14, inlinedAt: !65) !65 = !MDLocation(line: 20, scope: !18) !66 = !MDLocation(line: 17, scope: !14, inlinedAt: !65) -!67 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !22, type: !25, inlinedAt: !66) +!67 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !22, type: !25) !68 = !MDLocation(line: 0, scope: !22, inlinedAt: !66) !69 = !MDLocation(line: 8, scope: !22, inlinedAt: !66) !70 = !MDLocation(line: 9, scope: !41, inlinedAt: !66) diff --git a/test/DebugInfo/X86/reference-argument.ll b/test/DebugInfo/X86/reference-argument.ll index 20d83ed..a4e5aba 100644 --- a/test/DebugInfo/X86/reference-argument.ll +++ b/test/DebugInfo/X86/reference-argument.ll @@ -48,19 +48,16 @@ declare void @_ZN4SValD2Ev(%class.SVal* %this) !13 = !MDDerivedType(tag: DW_TAG_const_type, baseType: null) !14 = !MDDerivedType(tag: DW_TAG_member, name: "Kind", line: 16, size: 32, align: 32, offset: 64, file: !1, scope: !9, baseType: !15) !15 = !MDBasicType(tag: DW_TAG_base_type, name: "unsigned int", size: 32, align: 32, encoding: DW_ATE_unsigned) -!16 = !MDSubprogram(name: "~SVal", line: 14, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 14, file: !1, scope: !9, type: !17, variables: !20) +!16 = !MDSubprogram(name: "~SVal", line: 14, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 14, file: !1, scope: !9, type: !17) !17 = !MDSubroutineType(types: !18) !18 = !{null, !19} !19 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !9) -!20 = !{i32 786468} -!21 = !MDSubprogram(name: "SVal", line: 12, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 12, file: !1, scope: !9, type: !17, variables: !22) -!22 = !{i32 786468} -!23 = !MDSubprogram(name: "SVal", line: 12, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 12, file: !1, scope: !9, type: !24, variables: !28) +!21 = !MDSubprogram(name: "SVal", line: 12, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 12, file: !1, scope: !9, type: !17) +!23 = !MDSubprogram(name: "SVal", line: 12, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 12, file: !1, scope: !9, type: !24) !24 = !MDSubroutineType(types: !25) !25 = !{null, !19, !26} !26 = !MDDerivedType(tag: DW_TAG_reference_type, baseType: !27) !27 = !MDDerivedType(tag: DW_TAG_const_type, baseType: !9) -!28 = !{i32 786468} !29 = !MDSubprogram(name: "main", line: 25, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 25, file: !1, scope: !5, type: !30, function: i32 ()* @main, variables: !2) !30 = !MDSubroutineType(types: !31) !31 = !{!32} @@ -73,12 +70,10 @@ declare void @_ZN4SValD2Ev(%class.SVal* %this) !38 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !39) !39 = !MDCompositeType(tag: DW_TAG_class_type, name: "A", line: 20, size: 8, align: 8, file: !1, elements: !40) !40 = !{!41, !43} -!41 = !MDSubprogram(name: "foo", linkageName: "_ZN1A3fooE4SVal", line: 22, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 22, file: !1, scope: !39, type: !36, variables: !42) -!42 = !{i32 786468} -!43 = !MDSubprogram(name: "A", line: 20, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 20, file: !1, scope: !39, type: !44, variables: !46) +!41 = !MDSubprogram(name: "foo", linkageName: "_ZN1A3fooE4SVal", line: 22, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 22, file: !1, scope: !39, type: !36) +!43 = !MDSubprogram(name: "A", line: 20, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 20, file: !1, scope: !39, type: !44) !44 = !MDSubroutineType(types: !45) !45 = !{null, !38} -!46 = !{i32 786468} !47 = !{i32 2, !"Dwarf Version", i32 3} !48 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "v", line: 19, arg: 1, scope: !4, file: !5, type: !8) !49 = !MDLocation(line: 19, scope: !4) diff --git a/test/DebugInfo/X86/rvalue-ref.ll b/test/DebugInfo/X86/rvalue-ref.ll index daf58c1..c6f0007 100644 --- a/test/DebugInfo/X86/rvalue-ref.ll +++ b/test/DebugInfo/X86/rvalue-ref.ll @@ -12,7 +12,7 @@ entry: call void @llvm.dbg.declare(metadata i32** %i.addr, metadata !11, metadata !MDExpression()), !dbg !12 %0 = load i32*, i32** %i.addr, align 8, !dbg !13 %1 = load i32, i32* %0, align 4, !dbg !13 - %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i32 %1), !dbg !13 + %call = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i32 %1), !dbg !13 ret void, !dbg !15 } diff --git a/test/DebugInfo/X86/sroasplit-1.ll b/test/DebugInfo/X86/sroasplit-1.ll index 6471106..a25b8b2 100644 --- a/test/DebugInfo/X86/sroasplit-1.ll +++ b/test/DebugInfo/X86/sroasplit-1.ll @@ -65,11 +65,11 @@ attributes #2 = { nounwind } !llvm.module.flags = !{!22, !23} !llvm.ident = !{!24} -!0 = !MDCompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: 1, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = !MDCompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: 1, file: !1, enums: !{}, retainedTypes: !{}, subprograms: !3, globals: !{}, imports: !{}) !1 = !MDFile(filename: "sroasplit-1.c", directory: "") !2 = !MDExpression() !3 = !{!4} -!4 = !MDSubprogram(name: "foo", line: 10, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 10, file: !1, scope: !5, type: !6, function: i32 (%struct.Outer*)* @foo, variables: !2) +!4 = !MDSubprogram(name: "foo", line: 10, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 10, file: !1, scope: !5, type: !6, function: i32 (%struct.Outer*)* @foo, variables: !{}) !5 = !MDFile(filename: "sroasplit-1.c", directory: "") !6 = !MDSubroutineType(types: !7) !7 = !{!8, !9} diff --git a/test/DebugInfo/X86/sroasplit-2.ll b/test/DebugInfo/X86/sroasplit-2.ll index 4bf634b..1a80f3e 100644 --- a/test/DebugInfo/X86/sroasplit-2.ll +++ b/test/DebugInfo/X86/sroasplit-2.ll @@ -71,11 +71,11 @@ attributes #2 = { nounwind } !llvm.module.flags = !{!21, !22} !llvm.ident = !{!23} -!0 = !MDCompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: 1, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!0 = !MDCompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: 1, file: !1, enums: !{}, retainedTypes: !{}, subprograms: !3, globals: !{}, imports: !{}) !1 = !MDFile(filename: "sroasplit-2.c", directory: "") !2 = !MDExpression() !3 = !{!4} -!4 = !MDSubprogram(name: "foo", line: 10, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 10, file: !1, scope: !5, type: !6, function: i32 (i64, i64)* @foo, variables: !2) +!4 = !MDSubprogram(name: "foo", line: 10, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 10, file: !1, scope: !5, type: !6, function: i32 (i64, i64)* @foo, variables: !{}) !5 = !MDFile(filename: "sroasplit-2.c", directory: "") !6 = !MDSubroutineType(types: !7) !7 = !{!8, !9} diff --git a/test/DebugInfo/X86/stmt-list.ll b/test/DebugInfo/X86/stmt-list.ll index aac583c..9bf9edc 100644 --- a/test/DebugInfo/X86/stmt-list.ll +++ b/test/DebugInfo/X86/stmt-list.ll @@ -16,7 +16,7 @@ entry: !0 = !MDSubprogram(name: "f", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 1, file: !6, scope: !1, type: !3, function: void ()* @f) !1 = !MDFile(filename: "test2.c", directory: "/home/espindola/llvm") -!2 = !MDCompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 ()", isOptimized: true, emissionKind: 0, file: !6, enums: !4, retainedTypes: !4, subprograms: !5) +!2 = !MDCompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 ()", isOptimized: true, emissionKind: 0, file: !6, enums: !{}, retainedTypes: !{}, subprograms: !5) !3 = !MDSubroutineType(types: !4) !4 = !{null} !6 = !MDFile(filename: "test2.c", directory: "/home/espindola/llvm") diff --git a/test/DebugInfo/X86/subreg.ll b/test/DebugInfo/X86/subreg.ll index 8632c58..ce3870f 100644 --- a/test/DebugInfo/X86/subreg.ll +++ b/test/DebugInfo/X86/subreg.ll @@ -9,7 +9,7 @@ define i16 @f(i16 signext %zzz) nounwind { entry: - call void @llvm.dbg.value(metadata i16 %zzz, i64 0, metadata !0, metadata !MDExpression()) + call void @llvm.dbg.value(metadata i16 %zzz, i64 0, metadata !0, metadata !MDExpression()), !dbg !MDLocation(scope: !1) %conv = sext i16 %zzz to i32, !dbg !7 %conv1 = trunc i32 %conv to i16 ret i16 %conv1 @@ -24,7 +24,7 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon !0 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "zzz", line: 3, arg: 1, scope: !1, file: !2, type: !6) !1 = !MDSubprogram(name: "f", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !10, scope: !2, type: !4, function: i16 (i16)* @f) !2 = !MDFile(filename: "/home/espindola/llvm/test.c", directory: "/home/espindola/tmpfs/build") -!3 = !MDCompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 ()", isOptimized: false, emissionKind: 1, file: !10, enums: !5, retainedTypes: !5, subprograms: !9, imports: null) +!3 = !MDCompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 ()", isOptimized: false, emissionKind: 1, file: !10, enums: !{}, retainedTypes: !{}, subprograms: !9, imports: null) !4 = !MDSubroutineType(types: !5) !5 = !{null} !6 = !MDBasicType(tag: DW_TAG_base_type, name: "short", size: 16, align: 16, encoding: DW_ATE_signed) diff --git a/test/DebugInfo/X86/subregisters.ll b/test/DebugInfo/X86/subregisters.ll index 5e71d05..41691d2 100644 --- a/test/DebugInfo/X86/subregisters.ll +++ b/test/DebugInfo/X86/subregisters.ll @@ -44,7 +44,7 @@ entry: %a1 = getelementptr inbounds %struct.bar, %struct.bar* %b, i64 0, i32 0, !dbg !26 %0 = load i32, i32* %a1, align 4, !dbg !26, !tbaa !27 tail call void @llvm.dbg.value(metadata i32 %0, i64 0, metadata !16, metadata !MDExpression()), !dbg !26 - %call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0) #4, !dbg !32 + %call = tail call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0) #4, !dbg !32 ret void, !dbg !33 } diff --git a/test/DebugInfo/X86/union-template.ll b/test/DebugInfo/X86/union-template.ll index dfc96be..dfbc1c6 100644 --- a/test/DebugInfo/X86/union-template.ll +++ b/test/DebugInfo/X86/union-template.ll @@ -45,11 +45,10 @@ attributes #1 = { nounwind readnone } !13 = !{!14, !16} !14 = !MDDerivedType(tag: DW_TAG_member, name: "a", line: 2, size: 32, align: 32, file: !1, scope: !12, baseType: !15) !15 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!16 = !MDSubprogram(name: "Value", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !12, type: !17, variables: !20) +!16 = !MDSubprogram(name: "Value", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !12, type: !17) !17 = !MDSubroutineType(types: !18) !18 = !{null, !19} !19 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !12) -!20 = !{i32 786468} !21 = !{!22} !22 = !MDTemplateTypeParameter(name: "T", type: !8) !23 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "value", line: 3, arg: 1, scope: !4, file: !11, type: !8) |