diff options
Diffstat (limited to 'llvm/test/DebugInfo/Generic')
17 files changed, 642 insertions, 586 deletions
diff --git a/llvm/test/DebugInfo/Generic/2009-11-05-DeadGlobalVariable.ll b/llvm/test/DebugInfo/Generic/2009-11-05-DeadGlobalVariable.ll index b96fe661869..496897cc665 100644 --- a/llvm/test/DebugInfo/Generic/2009-11-05-DeadGlobalVariable.ll +++ b/llvm/test/DebugInfo/Generic/2009-11-05-DeadGlobalVariable.ll @@ -1,25 +1,30 @@ ; RUN: llc %s -o /dev/null ; Here variable bar is optimized away. Do not trip over while trying to generate debug info. +source_filename = "test/DebugInfo/Generic/2009-11-05-DeadGlobalVariable.ll" -define i32 @foo() nounwind uwtable readnone ssp !dbg !5 { +; Function Attrs: nounwind readnone ssp uwtable +define i32 @foo() #0 !dbg !6 { entry: - ret i32 42, !dbg !15 + ret i32 42, !dbg !11 } +attributes #0 = { nounwind readnone ssp uwtable } + !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!18} +!llvm.module.flags = !{!10} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 139632)", isOptimized: true, emissionKind: FullDebug, file: !17, enums: !1, retainedTypes: !1, globals: !12) -!1 = !{} -!5 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !0, file: !17, scope: !6, type: !7) -!6 = !DIFile(filename: "fb.c", directory: "/private/tmp") +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.0 (trunk 139632)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !3) +!1 = !DIFile(filename: "fb.c", directory: "/private/tmp") +!2 = !{} +!3 = !{!4} +!4 = !DIGlobalVariableExpression(var: !5) +!5 = !DIGlobalVariable(name: "bar", scope: !6, file: !1, line: 2, type: !9, isLocal: true, isDefinition: true) +!6 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !7, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !0) !7 = !DISubroutineType(types: !8) !8 = !{!9} -!9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!12 = !{!14} -!14 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "bar", line: 2, isLocal: true, isDefinition: true, scope: !5, file: !6, type: !9)) -!15 = !DILocation(line: 3, column: 3, scope: !16) -!16 = distinct !DILexicalBlock(line: 1, column: 11, file: !17, scope: !5) -!17 = !DIFile(filename: "fb.c", directory: "/private/tmp") -!18 = !{i32 1, !"Debug Info Version", i32 3} +!9 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) +!10 = !{i32 1, !"Debug Info Version", i32 3} +!11 = !DILocation(line: 3, column: 3, scope: !12) +!12 = distinct !DILexicalBlock(scope: !6, file: !1, line: 1, column: 11) + diff --git a/llvm/test/DebugInfo/Generic/2009-11-06-NamelessGlobalVariable.ll b/llvm/test/DebugInfo/Generic/2009-11-06-NamelessGlobalVariable.ll index 2037f0cd271..0108378340b 100644 --- a/llvm/test/DebugInfo/Generic/2009-11-06-NamelessGlobalVariable.ll +++ b/llvm/test/DebugInfo/Generic/2009-11-06-NamelessGlobalVariable.ll @@ -1,14 +1,16 @@ ; RUN: llc %s -o /dev/null -@0 = internal constant i32 1, !dbg !5 +source_filename = "test/DebugInfo/Generic/2009-11-06-NamelessGlobalVariable.ll" -!llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!9} +@0 = internal constant i32 1, !dbg !0 -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 139632)", isOptimized: true, emissionKind: FullDebug, file: !8, enums: !2, retainedTypes: !2, globals: !3) -!2 = !{} -!3 = !{!5} -!5 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "a", line: 2, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7)) -!6 = !DIFile(filename: "g.c", directory: "/private/tmp") -!7 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!8 = !DIFile(filename: "g.c", directory: "/private/tmp") -!9 = !{i32 1, !"Debug Info Version", i32 3} +!llvm.dbg.cu = !{!4} +!llvm.module.flags = !{!7} + +!0 = !DIGlobalVariableExpression(var: !1) +!1 = !DIGlobalVariable(name: "a", scope: null, file: !2, line: 2, type: !3, isLocal: false, isDefinition: true) +!2 = !DIFile(filename: "g.c", directory: "/private/tmp") +!3 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) +!4 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang version 3.0 (trunk 139632)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !5, retainedTypes: !5, globals: !6) +!5 = !{} +!6 = !{!0} +!7 = !{i32 1, !"Debug Info Version", i32 3} diff --git a/llvm/test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll b/llvm/test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll index ffd507ce068..31d3487db7a 100644 --- a/llvm/test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll +++ b/llvm/test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll @@ -5,56 +5,60 @@ ; CHECK: DW_TAG_structure_type ; CHECK-NEXT: DW_AT_name +source_filename = "test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll" -@i = common global i32 0, !dbg !16 ; <i32*> [#uses=2] +@i = common global i32 0, !dbg !0 -declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone +; Function Attrs: nounwind readnone +declare void @llvm.dbg.declare(metadata, metadata, metadata) #0 -declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnone +; Function Attrs: nounwind readnone +declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #0 -define i32 @bar() nounwind ssp !dbg !6 { +; Function Attrs: nounwind ssp +define i32 @bar() #1 !dbg !8 { 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 !59, metadata !DIExpression()), !dbg !19 - tail call void @llvm.dbg.declare(metadata !29, metadata !60, metadata !DIExpression()), !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 + %0 = load i32, i32* @i, align 4, !dbg !11 + tail call void @llvm.dbg.value(metadata i32 %0, i64 0, metadata !13, metadata !24), !dbg !25 + tail call void @llvm.dbg.declare(metadata !5, metadata !18, metadata !24), !dbg !26 + %1 = mul nsw i32 %0, %0, !dbg !27 + store i32 %1, i32* @i, align 4, !dbg !11 + ret i32 %1, !dbg !28 } -!llvm.dbg.cu = !{!2} -!llvm.module.flags = !{!28} - -!0 = distinct !DISubprogram(name: "foo", line: 9, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !2, scopeLine: 9, file: !27, scope: !1, type: !3, variables: !24) -!1 = !DIFile(filename: "bar.c", directory: "/tmp/") -!2 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: FullDebug, file: !27, enums: !20, retainedTypes: !20, globals: !26, imports: !20) -!3 = !DISubroutineType(types: !4) -!4 = !{!5, !5} -!5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!6 = distinct !DISubprogram(name: "bar", linkageName: "bar", line: 14, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !2, file: !27, scope: !1, type: !7) -!7 = !DISubroutineType(types: !8) -!8 = !{!5} -!9 = !DILocalVariable(name: "j", line: 9, arg: 1, scope: !0, file: !1, type: !5) -!10 = !DILocalVariable(name: "xyz", line: 10, scope: !11, file: !1, type: !12) - -!59 = !DILocalVariable(name: "j", line: 9, arg: 1, scope: !0, file: !1, type: !5) -!60 = !DILocalVariable(name: "xyz", line: 10, scope: !11, file: !1, type: !12) - -!11 = distinct !DILexicalBlock(line: 9, column: 0, file: !1, scope: !0) -!12 = !DICompositeType(tag: DW_TAG_structure_type, name: "X", line: 10, size: 64, align: 32, file: !27, scope: !0, elements: !13) -!13 = !{!14, !15} -!14 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 10, size: 32, align: 32, file: !27, scope: !12, baseType: !5) -!15 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 10, size: 32, align: 32, offset: 32, file: !27, scope: !12, baseType: !5) -!16 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "i", line: 5, isLocal: false, isDefinition: true, scope: !1, file: !1, type: !5)) -!17 = !DILocation(line: 15, scope: !18) -!18 = distinct !DILexicalBlock(line: 14, column: 0, file: !1, scope: !6) -!19 = !DILocation(line: 9, scope: !0, inlinedAt: !17) -!20 = !{} -!21 = !DILocation(line: 9, scope: !11, inlinedAt: !17) -!22 = !DILocation(line: 11, scope: !11, inlinedAt: !17) -!23 = !DILocation(line: 16, scope: !18) -!24 = !{!9, !10} -!26 = !{!16} -!27 = !DIFile(filename: "bar.c", directory: "/tmp/") -!28 = !{i32 1, !"Debug Info Version", i32 3} -!29 = !{null} +attributes #0 = { nounwind readnone } +attributes #1 = { nounwind ssp } + +!llvm.dbg.cu = !{!4} +!llvm.module.flags = !{!7} + +!0 = !DIGlobalVariableExpression(var: !1) +!1 = !DIGlobalVariable(name: "i", scope: !2, file: !2, line: 5, type: !3, isLocal: false, isDefinition: true) +!2 = !DIFile(filename: "bar.c", directory: "/tmp/") +!3 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) +!4 = distinct !DICompileUnit(language: DW_LANG_C89, file: !2, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !5, retainedTypes: !5, globals: !6, imports: !5) +!5 = !{} +!6 = !{!0} +!7 = !{i32 1, !"Debug Info Version", i32 3} +!8 = distinct !DISubprogram(name: "bar", linkageName: "bar", scope: !2, file: !2, line: 14, type: !9, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !4) +!9 = !DISubroutineType(types: !10) +!10 = !{!3} +!11 = !DILocation(line: 15, scope: !12) +!12 = distinct !DILexicalBlock(scope: !8, file: !2, line: 14) +!13 = !DILocalVariable(name: "j", arg: 1, scope: !14, file: !2, line: 9, type: !3) +!14 = distinct !DISubprogram(name: "foo", scope: !2, file: !2, line: 9, type: !15, isLocal: true, isDefinition: true, scopeLine: 9, virtualIndex: 6, isOptimized: true, unit: !4, variables: !17) +!15 = !DISubroutineType(types: !16) +!16 = !{!3, !3} +!17 = !{!13, !18} +!18 = !DILocalVariable(name: "xyz", scope: !19, file: !2, line: 10, type: !20) +!19 = distinct !DILexicalBlock(scope: !14, file: !2, line: 9) +!20 = !DICompositeType(tag: DW_TAG_structure_type, name: "X", scope: !14, file: !2, line: 10, size: 64, align: 32, elements: !21) +!21 = !{!22, !23} +!22 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !20, file: !2, line: 10, baseType: !3, size: 32, align: 32) +!23 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !20, file: !2, line: 10, baseType: !3, size: 32, align: 32, offset: 32) +!24 = !DIExpression() +!25 = !DILocation(line: 9, scope: !14, inlinedAt: !11) +!26 = !DILocation(line: 9, scope: !19, inlinedAt: !11) +!27 = !DILocation(line: 11, scope: !19, inlinedAt: !11) +!28 = !DILocation(line: 16, scope: !12) + diff --git a/llvm/test/DebugInfo/Generic/accel-table-hash-collisions.ll b/llvm/test/DebugInfo/Generic/accel-table-hash-collisions.ll index 151df8606f0..505477c8211 100644 --- a/llvm/test/DebugInfo/Generic/accel-table-hash-collisions.ll +++ b/llvm/test/DebugInfo/Generic/accel-table-hash-collisions.ll @@ -50,43 +50,56 @@ ; CHECK: Name: {{[0-9a-f]*}} "setStmt" ; CHECK: Name: {{[0-9a-f]*}} "_ZN4llvm5TwineC1Ei" +source_filename = "test/DebugInfo/Generic/accel-table-hash-collisions.ll" - -@ForceTopDown = common global i32 0, align 4, !dbg !4 +@ForceTopDown = common global i32 0, align 4, !dbg !0 @_ZNSt3__116allocator_traitsINS_9allocatorINS_11__tree_nodeINS_12__value_typeIPN4llvm10BasicBlockEPNS4_10RegionNodeEEEPvEEEEE11__constructIS9_JNS_4pairIS6_S8_EEEEEvNS_17integral_constantIbLb1EEERSC_PT_DpOT0_ = common global i32 0, align 4, !dbg !6 -@_ZN5clang23DataRecursiveASTVisitorIN12_GLOBAL__N_124UnusedBackingIvarCheckerEE26TraverseCUDAKernelCallExprEPNS_18CUDAKernelCallExprE = common global i32 0, align 4, !dbg !7 -@_ZN4llvm16DenseMapIteratorIPNS_10MDLocationENS_6detail13DenseSetEmptyENS_10MDNodeInfoIS1_EENS3_12DenseSetPairIS2_EELb0EE23AdvancePastEmptyBucketsEv = common global i32 0, align 4, !dbg !8 -@_ZNK4llvm12LivePhysRegs5printERNS_11raw_ostreamE = common global i32 0, align 4, !dbg !9 -@_ZN4llvm15ScalarEvolution14getSignedRangeEPKNS_4SCEVE = common global i32 0, align 4, !dbg !10 -@k1 = common global i32 0, align 4, !dbg !11 -@is = common global i32 0, align 4, !dbg !12 -@setStmt = common global i32 0, align 4, !dbg !13 -@_ZN4llvm5TwineC1Ei = common global i32 0, align 4, !dbg !14 -@_ZNK5clang12OverrideAttr5cloneERNS_10ASTContextE = common global i32 0, align 4, !dbg !15 -@_ZN4llvm22MachineModuleInfoMachOD2Ev = common global i32 0, align 4, !dbg !16 +@_ZN5clang23DataRecursiveASTVisitorIN12_GLOBAL__N_124UnusedBackingIvarCheckerEE26TraverseCUDAKernelCallExprEPNS_18CUDAKernelCallExprE = common global i32 0, align 4, !dbg !9 +@_ZN4llvm16DenseMapIteratorIPNS_10MDLocationENS_6detail13DenseSetEmptyENS_10MDNodeInfoIS1_EENS3_12DenseSetPairIS2_EELb0EE23AdvancePastEmptyBucketsEv = common global i32 0, align 4, !dbg !11 +@_ZNK4llvm12LivePhysRegs5printERNS_11raw_ostreamE = common global i32 0, align 4, !dbg !13 +@_ZN4llvm15ScalarEvolution14getSignedRangeEPKNS_4SCEVE = common global i32 0, align 4, !dbg !15 +@k1 = common global i32 0, align 4, !dbg !17 +@is = common global i32 0, align 4, !dbg !19 +@setStmt = common global i32 0, align 4, !dbg !21 +@_ZN4llvm5TwineC1Ei = common global i32 0, align 4, !dbg !23 +@_ZNK5clang12OverrideAttr5cloneERNS_10ASTContextE = common global i32 0, align 4, !dbg !25 +@_ZN4llvm22MachineModuleInfoMachOD2Ev = common global i32 0, align 4, !dbg !27 + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!29, !30, !31} +!llvm.ident = !{!32} -!llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!17, !18, !19} -!llvm.ident = !{!20} +!0 = !DIGlobalVariableExpression(var: !1) +!1 = !DIGlobalVariable(name: "ForceTopDown", scope: !2, file: !3, line: 1, type: !8, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 3.7.0 (trunk 231548) (llvm/trunk 231547)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !4, globals: !5, imports: !4) +!3 = !DIFile(filename: "hash-collisions.c", directory: "/tmp") +!4 = !{} +!5 = !{!0, !6, !9, !11, !13, !15, !17, !19, !21, !23, !25, !27} +!6 = !DIGlobalVariableExpression(var: !7) +!7 = !DIGlobalVariable(name: "_ZNSt3__116allocator_traitsINS_9allocatorINS_11__tree_nodeINS_12__value_typeIPN4llvm10BasicBlockEPNS4_10RegionNodeEEEPvEEEEE11__constructIS9_JNS_4pairIS6_S8_EEEEEvNS_17integral_constantIbLb1EEERSC_PT_DpOT0_", scope: !2, file: !3, line: 2, type: !8, isLocal: false, isDefinition: true) +!8 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) +!9 = !DIGlobalVariableExpression(var: !10) +!10 = !DIGlobalVariable(name: "_ZN5clang23DataRecursiveASTVisitorIN12_GLOBAL__N_124UnusedBackingIvarCheckerEE26TraverseCUDAKernelCallExprEPNS_18CUDAKernelCallExprE", scope: !2, file: !3, line: 3, type: !8, isLocal: false, isDefinition: true) +!11 = !DIGlobalVariableExpression(var: !12) +!12 = !DIGlobalVariable(name: "_ZN4llvm16DenseMapIteratorIPNS_10MDLocationENS_6detail13DenseSetEmptyENS_10MDNodeInfoIS1_EENS3_12DenseSetPairIS2_EELb0EE23AdvancePastEmptyBucketsEv", scope: !2, file: !3, line: 4, type: !8, isLocal: false, isDefinition: true) +!13 = !DIGlobalVariableExpression(var: !14) +!14 = !DIGlobalVariable(name: "_ZNK4llvm12LivePhysRegs5printERNS_11raw_ostreamE", scope: !2, file: !3, line: 5, type: !8, isLocal: false, isDefinition: true) +!15 = !DIGlobalVariableExpression(var: !16) +!16 = !DIGlobalVariable(name: "_ZN4llvm15ScalarEvolution14getSignedRangeEPKNS_4SCEVE", scope: !2, file: !3, line: 6, type: !8, isLocal: false, isDefinition: true) +!17 = !DIGlobalVariableExpression(var: !18) +!18 = !DIGlobalVariable(name: "k1", scope: !2, file: !3, line: 7, type: !8, isLocal: false, isDefinition: true) +!19 = !DIGlobalVariableExpression(var: !20) +!20 = !DIGlobalVariable(name: "is", scope: !2, file: !3, line: 8, type: !8, isLocal: false, isDefinition: true) +!21 = !DIGlobalVariableExpression(var: !22) +!22 = !DIGlobalVariable(name: "setStmt", scope: !2, file: !3, line: 9, type: !8, isLocal: false, isDefinition: true) +!23 = !DIGlobalVariableExpression(var: !24) +!24 = !DIGlobalVariable(name: "_ZN4llvm5TwineC1Ei", scope: !2, file: !3, line: 10, type: !8, isLocal: false, isDefinition: true) +!25 = !DIGlobalVariableExpression(var: !26) +!26 = !DIGlobalVariable(name: "_ZNK5clang12OverrideAttr5cloneERNS_10ASTContextE", scope: !2, file: !3, line: 11, type: !8, isLocal: false, isDefinition: true) +!27 = !DIGlobalVariableExpression(var: !28) +!28 = !DIGlobalVariable(name: "_ZN4llvm22MachineModuleInfoMachOD2Ev", scope: !2, file: !3, line: 12, type: !8, isLocal: false, isDefinition: true) +!29 = !{i32 2, !"Dwarf Version", i32 2} +!30 = !{i32 2, !"Debug Info Version", i32 3} +!31 = !{i32 1, !"PIC Level", i32 2} +!32 = !{!"clang version 3.7.0 (trunk 231548) (llvm/trunk 231547)"} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 231548) (llvm/trunk 231547)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !3, imports: !2) -!1 = !DIFile(filename: "hash-collisions.c", directory: "/tmp") -!2 = !{} -!3 = !{!4, !6, !7, !8, !9, !10, !11, !12, !13, !14, !15, !16} -!4 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "ForceTopDown", scope: !0, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true)) -!5 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!6 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "_ZNSt3__116allocator_traitsINS_9allocatorINS_11__tree_nodeINS_12__value_typeIPN4llvm10BasicBlockEPNS4_10RegionNodeEEEPvEEEEE11__constructIS9_JNS_4pairIS6_S8_EEEEEvNS_17integral_constantIbLb1EEERSC_PT_DpOT0_", scope: !0, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true)) -!7 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "_ZN5clang23DataRecursiveASTVisitorIN12_GLOBAL__N_124UnusedBackingIvarCheckerEE26TraverseCUDAKernelCallExprEPNS_18CUDAKernelCallExprE", scope: !0, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true)) -!8 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "_ZN4llvm16DenseMapIteratorIPNS_10MDLocationENS_6detail13DenseSetEmptyENS_10MDNodeInfoIS1_EENS3_12DenseSetPairIS2_EELb0EE23AdvancePastEmptyBucketsEv", scope: !0, file: !1, line: 4, type: !5, isLocal: false, isDefinition: true)) -!9 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "_ZNK4llvm12LivePhysRegs5printERNS_11raw_ostreamE", scope: !0, file: !1, line: 5, type: !5, isLocal: false, isDefinition: true)) -!10 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "_ZN4llvm15ScalarEvolution14getSignedRangeEPKNS_4SCEVE", scope: !0, file: !1, line: 6, type: !5, isLocal: false, isDefinition: true)) -!11 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "k1", scope: !0, file: !1, line: 7, type: !5, isLocal: false, isDefinition: true)) -!12 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "is", scope: !0, file: !1, line: 8, type: !5, isLocal: false, isDefinition: true)) -!13 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "setStmt", scope: !0, file: !1, line: 9, type: !5, isLocal: false, isDefinition: true)) -!14 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "_ZN4llvm5TwineC1Ei", scope: !0, file: !1, line: 10, type: !5, isLocal: false, isDefinition: true)) -!15 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "_ZNK5clang12OverrideAttr5cloneERNS_10ASTContextE", scope: !0, file: !1, line: 11, type: !5, isLocal: false, isDefinition: true)) -!16 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "_ZN4llvm22MachineModuleInfoMachOD2Ev", scope: !0, file: !1, line: 12, type: !5, isLocal: false, isDefinition: true)) -!17 = !{i32 2, !"Dwarf Version", i32 2} -!18 = !{i32 2, !"Debug Info Version", i32 3} -!19 = !{i32 1, !"PIC Level", i32 2} -!20 = !{!"clang version 3.7.0 (trunk 231548) (llvm/trunk 231547)"} diff --git a/llvm/test/DebugInfo/Generic/cross-cu-linkonce-distinct.ll b/llvm/test/DebugInfo/Generic/cross-cu-linkonce-distinct.ll index 33715c0ccc2..0488e64e23c 100644 --- a/llvm/test/DebugInfo/Generic/cross-cu-linkonce-distinct.ll +++ b/llvm/test/DebugInfo/Generic/cross-cu-linkonce-distinct.ll @@ -37,17 +37,19 @@ ; CHECK: DW_AT_name {{.*}}"a.cpp" ; CHECK: DW_AT_name {{.*}} "func" -@x = global i32 (i32)* @_Z4funci, align 8, !dbg !10 -@y = global i32 (i32)* @_Z4funci, align 8, !dbg !18 +source_filename = "test/DebugInfo/Generic/cross-cu-linkonce-distinct.ll" + +@x = global i32 (i32)* @_Z4funci, align 8, !dbg !0 +@y = global i32 (i32)* @_Z4funci, align 8, !dbg !7 ; Function Attrs: inlinehint nounwind uwtable -define linkonce_odr i32 @_Z4funci(i32 %i) #0 !dbg !4 { +define linkonce_odr i32 @_Z4funci(i32 %i) #0 !dbg !18 { %1 = alloca i32, align 4 store i32 %i, i32* %1, align 4 - call void @llvm.dbg.declare(metadata i32* %1, metadata !22, metadata !DIExpression()), !dbg !23 - %2 = load i32, i32* %1, align 4, !dbg !24 - %3 = mul nsw i32 %2, 2, !dbg !24 - ret i32 %3, !dbg !24 + call void @llvm.dbg.declare(metadata i32* %1, metadata !19, metadata !20), !dbg !21 + %2 = load i32, i32* %1, align 4, !dbg !22 + %3 = mul nsw i32 %2, 2, !dbg !22 + ret i32 %3, !dbg !22 } ; Function Attrs: nounwind readnone @@ -56,30 +58,31 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 attributes #0 = { inlinehint nounwind uwtable } attributes #1 = { nounwind readnone } -!llvm.dbg.cu = !{!12, !0} -!llvm.module.flags = !{!19, !20} -!llvm.ident = !{!21, !21} +!llvm.dbg.cu = !{!10, !13} +!llvm.module.flags = !{!15, !16} +!llvm.ident = !{!17, !17} + +!0 = !DIGlobalVariableExpression(var: !1) +!1 = !DIGlobalVariable(name: "x", scope: null, file: !2, line: 4, type: !3, isLocal: false, isDefinition: true) +!2 = !DIFile(filename: "a.cpp", directory: "/tmp/dbginfo") +!3 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !4, size: 64, align: 64) +!4 = !DISubroutineType(types: !5) +!5 = !{!6, !6} +!6 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) +!7 = !DIGlobalVariableExpression(var: !8) +!8 = !DIGlobalVariable(name: "y", scope: null, file: !9, line: 4, type: !3, isLocal: false, isDefinition: true) +!9 = !DIFile(filename: "b.cpp", directory: "/tmp/dbginfo") +!10 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !9, producer: "clang version 3.5.0 ", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !11, retainedTypes: !11, globals: !12, imports: !11) +!11 = !{} +!12 = !{!7} +!13 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 3.5.0 ", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !11, retainedTypes: !11, globals: !14, imports: !11) +!14 = !{!0} +!15 = !{i32 2, !"Dwarf Version", i32 4} +!16 = !{i32 1, !"Debug Info Version", i32 3} +!17 = !{!"clang version 3.5.0 "} +!18 = distinct !DISubprogram(name: "func", linkageName: "_Z4funci", scope: !2, file: !2, line: 1, type: !4, isLocal: false, isDefinition: true, scopeLine: 1, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !13, variables: !11) +!19 = !DILocalVariable(name: "i", arg: 1, scope: !18, file: !2, line: 1, type: !6) +!20 = !DIExpression() +!21 = !DILocation(line: 1, scope: !18) +!22 = !DILocation(line: 2, scope: !18) -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !9, imports: !2) -!1 = !DIFile(filename: "a.cpp", directory: "/tmp/dbginfo") -!2 = !{} -!4 = distinct !DISubprogram(name: "func", linkageName: "_Z4funci", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) -!5 = !DIFile(filename: "a.cpp", directory: "/tmp/dbginfo") -!6 = !DISubroutineType(types: !7) -!7 = !{!8, !8} -!8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!9 = !{!10} -!10 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "x", line: 4, isLocal: false, isDefinition: true, scope: null, file: !5, type: !11)) -!11 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !6) -!12 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !13, enums: !2, retainedTypes: !2, globals: !17, imports: !2) -!13 = !DIFile(filename: "b.cpp", directory: "/tmp/dbginfo") -!15 = distinct !DISubprogram(name: "func", linkageName: "_Z4funci", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !12, scopeLine: 1, file: !13, scope: !16, type: !6, variables: !2) -!16 = !DIFile(filename: "b.cpp", directory: "/tmp/dbginfo") -!17 = !{!18} -!18 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "y", line: 4, isLocal: false, isDefinition: true, scope: null, file: !16, type: !11)) -!19 = !{i32 2, !"Dwarf Version", i32 4} -!20 = !{i32 1, !"Debug Info Version", i32 3} -!21 = !{!"clang version 3.5.0 "} -!22 = !DILocalVariable(name: "i", line: 1, arg: 1, scope: !4, file: !5, type: !8) -!23 = !DILocation(line: 1, scope: !4) -!24 = !DILocation(line: 2, scope: !4) diff --git a/llvm/test/DebugInfo/Generic/cross-cu-linkonce.ll b/llvm/test/DebugInfo/Generic/cross-cu-linkonce.ll index 3c513d7af40..f0b70cd615c 100644 --- a/llvm/test/DebugInfo/Generic/cross-cu-linkonce.ll +++ b/llvm/test/DebugInfo/Generic/cross-cu-linkonce.ll @@ -25,17 +25,19 @@ ; CHECK: DW_TAG_compile_unit ; CHECK-NOT: DW_TAG_subprogram -@x = global i32 (i32)* @_Z4funci, align 8, !dbg !11 -@y = global i32 (i32)* @_Z4funci, align 8, !dbg !16 +source_filename = "test/DebugInfo/Generic/cross-cu-linkonce.ll" + +@x = global i32 (i32)* @_Z4funci, align 8, !dbg !0 +@y = global i32 (i32)* @_Z4funci, align 8, !dbg !7 ; Function Attrs: inlinehint nounwind uwtable -define linkonce_odr i32 @_Z4funci(i32 %i) #0 !dbg !4 { +define linkonce_odr i32 @_Z4funci(i32 %i) #0 !dbg !19 { %1 = alloca i32, align 4 store i32 %i, i32* %1, align 4 - call void @llvm.dbg.declare(metadata i32* %1, metadata !20, metadata !DIExpression()), !dbg !21 - %2 = load i32, i32* %1, align 4, !dbg !22 - %3 = mul nsw i32 %2, 2, !dbg !22 - ret i32 %3, !dbg !22 + call void @llvm.dbg.declare(metadata i32* %1, metadata !20, metadata !21), !dbg !22 + %2 = load i32, i32* %1, align 4, !dbg !23 + %3 = mul nsw i32 %2, 2, !dbg !23 + ret i32 %3, !dbg !23 } ; Function Attrs: nounwind readnone @@ -44,30 +46,32 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 attributes #0 = { inlinehint 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 #1 = { nounwind readnone } -!llvm.dbg.cu = !{!0, !13} -!llvm.module.flags = !{!17, !18} -!llvm.ident = !{!19, !19} +!llvm.dbg.cu = !{!9, !13} +!llvm.module.flags = !{!16, !17} +!llvm.ident = !{!18, !18} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !10, imports: !2) -!1 = !DIFile(filename: "a.cpp", directory: "/tmp/dbginfo") -!2 = !{} -!4 = distinct !DISubprogram(name: "func", linkageName: "_Z4funci", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !5, scope: !6, type: !7, variables: !2) -!5 = !DIFile(filename: "func.h", directory: "/tmp/dbginfo") -!6 = !DIFile(filename: "func.h", directory: "/tmp/dbginfo") -!7 = !DISubroutineType(types: !8) -!8 = !{!9, !9} -!9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!10 = !{!11} -!11 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "x", line: 4, isLocal: false, isDefinition: true, scope: null, file: !6, type: !12)) -!12 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !7) -!13 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !14, enums: !2, retainedTypes: !2, globals: !15, imports: !2) +!0 = !DIGlobalVariableExpression(var: !1) +!1 = !DIGlobalVariable(name: "x", scope: null, file: !2, line: 4, type: !3, isLocal: false, isDefinition: true) +!2 = !DIFile(filename: "func.h", directory: "/tmp/dbginfo") +!3 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !4, size: 64, align: 64) +!4 = !DISubroutineType(types: !5) +!5 = !{!6, !6} +!6 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) +!7 = !DIGlobalVariableExpression(var: !8) +!8 = !DIGlobalVariable(name: "y", scope: null, file: !2, line: 4, type: !3, isLocal: false, isDefinition: true) +!9 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !10, producer: "clang version 3.5.0 ", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !11, retainedTypes: !11, globals: !12, imports: !11) +!10 = !DIFile(filename: "a.cpp", directory: "/tmp/dbginfo") +!11 = !{} +!12 = !{!0} +!13 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !14, producer: "clang version 3.5.0 ", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !11, retainedTypes: !11, globals: !15, imports: !11) !14 = !DIFile(filename: "b.cpp", directory: "/tmp/dbginfo") -!15 = !{!16} -!16 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "y", line: 4, isLocal: false, isDefinition: true, scope: null, file: !6, type: !12)) -!17 = !{i32 2, !"Dwarf Version", i32 4} -!18 = !{i32 1, !"Debug Info Version", i32 3} -!19 = !{!"clang version 3.5.0 "} -!20 = !DILocalVariable(name: "i", line: 1, arg: 1, scope: !4, file: !6, type: !9) -!21 = !DILocation(line: 1, scope: !4) -!22 = !DILocation(line: 2, scope: !4) -!24 = distinct !DISubprogram(name: "func", linkageName: "_Z4funci", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !13, scopeLine: 1, file: !5, scope: !6, type: !7, variables: !2) +!15 = !{!7} +!16 = !{i32 2, !"Dwarf Version", i32 4} +!17 = !{i32 1, !"Debug Info Version", i32 3} +!18 = !{!"clang version 3.5.0 "} +!19 = distinct !DISubprogram(name: "func", linkageName: "_Z4funci", scope: !2, file: !2, line: 1, type: !4, isLocal: false, isDefinition: true, scopeLine: 1, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !9, variables: !11) +!20 = !DILocalVariable(name: "i", arg: 1, scope: !19, file: !2, line: 1, type: !6) +!21 = !DIExpression() +!22 = !DILocation(line: 1, scope: !19) +!23 = !DILocation(line: 2, scope: !19) + diff --git a/llvm/test/DebugInfo/Generic/dbg-at-specficiation.ll b/llvm/test/DebugInfo/Generic/dbg-at-specficiation.ll index 18d2d550be0..a0cda09df19 100644 --- a/llvm/test/DebugInfo/Generic/dbg-at-specficiation.ll +++ b/llvm/test/DebugInfo/Generic/dbg-at-specficiation.ll @@ -3,19 +3,21 @@ ; Do not unnecessarily use AT_specification DIE. ; CHECK-NOT: AT_specification -@a = common global [10 x i32] zeroinitializer, align 16, !dbg !5 +source_filename = "test/DebugInfo/Generic/dbg-at-specficiation.ll" -!llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!12} +@a = common global [10 x i32] zeroinitializer, align 16, !dbg !0 -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 140253)", isOptimized: true, emissionKind: FullDebug, file: !11, enums: !2, retainedTypes: !2, globals: !3) -!2 = !{} -!3 = !{!5} -!5 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "a", line: 1, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7)) -!6 = !DIFile(filename: "x.c", directory: "/private/tmp") -!7 = !DICompositeType(tag: DW_TAG_array_type, size: 320, align: 32, baseType: !8, elements: !9) -!8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!9 = !{!10} -!10 = !DISubrange(count: 10) -!11 = !DIFile(filename: "x.c", directory: "/private/tmp") -!12 = !{i32 1, !"Debug Info Version", i32 3} +!llvm.dbg.cu = !{!7} +!llvm.module.flags = !{!10} + +!0 = !DIGlobalVariableExpression(var: !1) +!1 = !DIGlobalVariable(name: "a", scope: null, file: !2, line: 1, type: !3, isLocal: false, isDefinition: true) +!2 = !DIFile(filename: "x.c", directory: "/private/tmp") +!3 = !DICompositeType(tag: DW_TAG_array_type, baseType: !4, size: 320, align: 32, elements: !5) +!4 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) +!5 = !{!6} +!6 = !DISubrange(count: 10) +!7 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang version 3.0 (trunk 140253)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !8, retainedTypes: !8, globals: !9) +!8 = !{} +!9 = !{!0} +!10 = !{i32 1, !"Debug Info Version", i32 3} diff --git a/llvm/test/DebugInfo/Generic/debuginfofinder-forward-declaration.ll b/llvm/test/DebugInfo/Generic/debuginfofinder-forward-declaration.ll index 66f979ddd2a..23084795b0a 100644 --- a/llvm/test/DebugInfo/Generic/debuginfofinder-forward-declaration.ll +++ b/llvm/test/DebugInfo/Generic/debuginfofinder-forward-declaration.ll @@ -1,6 +1,5 @@ ; RUN: opt -analyze -module-debuginfo < %s | FileCheck %s - ; This module is generated from the following c-code: ; ; > union X; @@ -11,32 +10,34 @@ ; > ; > struct Y y; - ; CHECK: Type: Y from /tmp/minimal.c:3 DW_TAG_structure_type ; CHECK: Type: x from /tmp/minimal.c:4 DW_TAG_member ; CHECK: Type: DW_TAG_pointer_type ; CHECK: Type: X from /tmp/minimal.c:1 DW_TAG_structure_type +source_filename = "test/DebugInfo/Generic/debuginfofinder-forward-declaration.ll" %struct.Y = type { %struct.X* } %struct.X = type opaque -@y = common global %struct.Y zeroinitializer, align 8, !dbg !4 - -!llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!10, !11} -!llvm.ident = !{!12} - -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (http://llvm.org/git/clang.git 247b30a043eb8f39ea3708e7e995089da0a6b00f) (http://llvm.org/git/llvm.git 6ecc7365a89c771fd229bdd9ffcc178684ea1aa5)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !3, imports: !2) -!1 = !DIFile(filename: "minimal.c", directory: "/tmp") -!2 = !{} -!3 = !{!4} -!4 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "y", scope: !0, file: !1, line: 7, type: !5, isLocal: false, isDefinition: true)) -!5 = !DICompositeType(tag: DW_TAG_structure_type, name: "Y", file: !1, line: 3, size: 64, align: 64, elements: !6) -!6 = !{!7} -!7 = !DIDerivedType(tag: DW_TAG_member, name: "x", scope: !5, file: !1, line: 4, baseType: !8, size: 64, align: 64) -!8 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !9, size: 64, align: 64) -!9 = !DICompositeType(tag: DW_TAG_structure_type, name: "X", file: !1, line: 1, flags: DIFlagFwdDecl) -!10 = !{i32 2, !"Dwarf Version", i32 4} -!11 = !{i32 2, !"Debug Info Version", i32 3} -!12 = !{!"clang version 3.7.0 (http://llvm.org/git/clang.git 247b30a043eb8f39ea3708e7e995089da0a6b00f) (http://llvm.org/git/llvm.git 6ecc7365a89c771fd229bdd9ffcc178684ea1aa5)"} +@y = common global %struct.Y zeroinitializer, align 8, !dbg !0 + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!11, !12} +!llvm.ident = !{!13} + +!0 = !DIGlobalVariableExpression(var: !1) +!1 = !DIGlobalVariable(name: "y", scope: !2, file: !3, line: 7, type: !6, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 3.7.0 (http://llvm.org/git/clang.git 247b30a043eb8f39ea3708e7e995089da0a6b00f) (http://llvm.org/git/llvm.git 6ecc7365a89c771fd229bdd9ffcc178684ea1aa5)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !4, globals: !5, imports: !4) +!3 = !DIFile(filename: "minimal.c", directory: "/tmp") +!4 = !{} +!5 = !{!0} +!6 = !DICompositeType(tag: DW_TAG_structure_type, name: "Y", file: !3, line: 3, size: 64, align: 64, elements: !7) +!7 = !{!8} +!8 = !DIDerivedType(tag: DW_TAG_member, name: "x", scope: !6, file: !3, line: 4, baseType: !9, size: 64, align: 64) +!9 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !10, size: 64, align: 64) +!10 = !DICompositeType(tag: DW_TAG_structure_type, name: "X", file: !3, line: 1, flags: DIFlagFwdDecl) +!11 = !{i32 2, !"Dwarf Version", i32 4} +!12 = !{i32 2, !"Debug Info Version", i32 3} +!13 = !{!"clang version 3.7.0 (http://llvm.org/git/clang.git 247b30a043eb8f39ea3708e7e995089da0a6b00f) (http://llvm.org/git/llvm.git 6ecc7365a89c771fd229bdd9ffcc178684ea1aa5)"} + diff --git a/llvm/test/DebugInfo/Generic/dwarf-public-names.ll b/llvm/test/DebugInfo/Generic/dwarf-public-names.ll index 66f8c186e78..42f4c9a34ff 100644 --- a/llvm/test/DebugInfo/Generic/dwarf-public-names.ll +++ b/llvm/test/DebugInfo/Generic/dwarf-public-names.ll @@ -49,82 +49,91 @@ ; CHECK-DAG: "C::static_member_variable" ; CHECK-DAG: "C::member_function" +source_filename = "test/DebugInfo/Generic/dwarf-public-names.ll" + %struct.C = type { i8 } -@_ZN1C22static_member_variableE = global i32 0, align 4, !dbg !25 -@global_variable = global %struct.C zeroinitializer, align 1, !dbg !26 -@_ZN2ns25global_namespace_variableE = global i32 1, align 4, !dbg !27 +@_ZN1C22static_member_variableE = global i32 0, align 4, !dbg !0 +@global_variable = global %struct.C zeroinitializer, align 1, !dbg !15 +@_ZN2ns25global_namespace_variableE = global i32 1, align 4, !dbg !17 -define void @_ZN1C15member_functionEv(%struct.C* %this) nounwind uwtable align 2 !dbg !3 { +; Function Attrs: nounwind uwtable +define void @_ZN1C15member_functionEv(%struct.C* %this) #0 align 2 !dbg !23 { 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 !28, metadata !DIExpression()), !dbg !30 + call void @llvm.dbg.declare(metadata %struct.C** %this.addr, metadata !24, metadata !26), !dbg !27 %this1 = load %struct.C*, %struct.C** %this.addr - store i32 0, i32* @_ZN1C22static_member_variableE, align 4, !dbg !31 - ret void, !dbg !32 + store i32 0, i32* @_ZN1C22static_member_variableE, align 4, !dbg !28 + ret void, !dbg !29 } -declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone +; Function Attrs: nounwind readnone +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 -define i32 @_ZN1C22static_member_functionEv() nounwind uwtable align 2 !dbg !18 { +; Function Attrs: nounwind uwtable +define i32 @_ZN1C22static_member_functionEv() #0 align 2 !dbg !30 { entry: - %0 = load i32, i32* @_ZN1C22static_member_variableE, align 4, !dbg !33 - ret i32 %0, !dbg !33 + %0 = load i32, i32* @_ZN1C22static_member_variableE, align 4, !dbg !31 + ret i32 %0, !dbg !31 } -define i32 @_Z15global_functionv() nounwind uwtable !dbg !19 { +; Function Attrs: nounwind uwtable +define i32 @_Z15global_functionv() #0 !dbg !32 { entry: - ret i32 -1, !dbg !34 + ret i32 -1, !dbg !33 } -define void @_ZN2ns25global_namespace_functionEv() nounwind uwtable !dbg !20 { +; Function Attrs: nounwind uwtable +define void @_ZN2ns25global_namespace_functionEv() #0 !dbg !34 { entry: - call void @_ZN1C15member_functionEv(%struct.C* @global_variable), !dbg !35 - ret void, !dbg !36 + call void @_ZN1C15member_functionEv(%struct.C* @global_variable), !dbg !37 + ret void, !dbg !38 } attributes #0 = { nounwind uwtable } attributes #1 = { nounwind readnone } -!llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!38} +!llvm.dbg.cu = !{!20} +!llvm.module.flags = !{!22} + +!0 = !DIGlobalVariableExpression(var: !1) +!1 = !DIGlobalVariable(name: "static_member_variable", linkageName: "_ZN1C22static_member_variableE", scope: !2, file: !3, line: 7, type: !6, isLocal: false, isDefinition: true, declaration: !5) +!2 = !DICompositeType(tag: DW_TAG_structure_type, name: "C", file: !3, line: 1, size: 8, align: 8, elements: !4) +!3 = !DIFile(filename: "dwarf-public-names.cpp", directory: "/usr2/kparzysz/s.hex/t") +!4 = !{!5, !7, !12} +!5 = !DIDerivedType(tag: DW_TAG_member, name: "static_member_variable", scope: !2, file: !3, line: 4, baseType: !6, flags: DIFlagStaticMember) +!6 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) +!7 = !DISubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", scope: !2, file: !3, line: 2, type: !8, isLocal: false, isDefinition: false, scopeLine: 2, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, variables: !11) +!8 = !DISubroutineType(types: !9) +!9 = !{null, !10} +!10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !2, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer) +!11 = !{} +!12 = !DISubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", scope: !2, file: !3, line: 3, type: !13, isLocal: false, isDefinition: false, scopeLine: 3, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, variables: !11) +!13 = !DISubroutineType(types: !14) +!14 = !{!6} +!15 = !DIGlobalVariableExpression(var: !16) +!16 = !DIGlobalVariable(name: "global_variable", scope: null, file: !3, line: 17, type: !2, isLocal: false, isDefinition: true) ; previously: invalid DW_TAG_base_type +!17 = !DIGlobalVariableExpression(var: !18) +!18 = !DIGlobalVariable(name: "global_namespace_variable", linkageName: "_ZN2ns25global_namespace_variableE", scope: !19, file: !3, line: 27, type: !6, isLocal: false, isDefinition: true) +!19 = !DINamespace(name: "ns", scope: null, file: !3, line: 23) +!20 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 3.3 (http://llvm.org/git/clang.git a09cd8103a6a719cb2628cdf0c91682250a17bd2) (http://llvm.org/git/llvm.git 47d03cec0afca0c01ae42b82916d1d731716cd20)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !11, retainedTypes: !11, globals: !21, imports: !11) ; previously: invalid DW_TAG_base_type +!21 = !{!0, !15, !17} +!22 = !{i32 1, !"Debug Info Version", i32 3} +!23 = distinct !DISubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", scope: null, file: !3, line: 9, type: !8, isLocal: false, isDefinition: true, scopeLine: 9, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !20, declaration: !7, variables: !11) +!24 = !DILocalVariable(name: "this", arg: 1, scope: !23, file: !3, line: 9, type: !25, flags: DIFlagArtificial | DIFlagObjectPointer) +!25 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !2, size: 64, align: 64) +!26 = !DIExpression() +!27 = !DILocation(line: 9, scope: !23) +!28 = !DILocation(line: 10, scope: !23) +!29 = !DILocation(line: 11, scope: !23) +!30 = distinct !DISubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", scope: null, file: !3, line: 13, type: !13, isLocal: false, isDefinition: true, scopeLine: 13, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !20, declaration: !12, variables: !11) +!31 = !DILocation(line: 14, scope: !30) +!32 = distinct !DISubprogram(name: "global_function", linkageName: "_Z15global_functionv", scope: !3, file: !3, line: 19, type: !13, isLocal: false, isDefinition: true, scopeLine: 19, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !20, variables: !11) +!33 = !DILocation(line: 20, scope: !32) +!34 = distinct !DISubprogram(name: "global_namespace_function", linkageName: "_ZN2ns25global_namespace_functionEv", scope: !19, file: !3, line: 24, type: !35, isLocal: false, isDefinition: true, scopeLine: 24, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !20, variables: !11) +!35 = !DISubroutineType(types: !36) +!36 = !{null} +!37 = !DILocation(line: 25, scope: !34) +!38 = !DILocation(line: 26, scope: !34) -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (http://llvm.org/git/clang.git a09cd8103a6a719cb2628cdf0c91682250a17bd2) (http://llvm.org/git/llvm.git 47d03cec0afca0c01ae42b82916d1d731716cd20)", isOptimized: false, emissionKind: FullDebug, file: !37, enums: !1, retainedTypes: !1, globals: !24, imports: !1) -!1 = !{} -!3 = distinct !DISubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", line: 9, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 9, file: !4, scope: null, type: !5, declaration: !12, variables: !1) -!4 = !DIFile(filename: "dwarf-public-names.cpp", directory: "/usr2/kparzysz/s.hex/t") -!5 = !DISubroutineType(types: !6) -!6 = !{null, !7} -!7 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !8) -!8 = !DICompositeType(tag: DW_TAG_structure_type, name: "C", line: 1, size: 8, align: 8, file: !37, elements: !9) -!9 = !{!10, !12, !14} -!10 = !DIDerivedType(tag: DW_TAG_member, name: "static_member_variable", line: 4, flags: DIFlagStaticMember, file: !37, scope: !8, baseType: !11) -!11 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!12 = !DISubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !4, scope: !8, type: !5, variables: !13) -!13 = !{} ; previously: invalid DW_TAG_base_type -!14 = !DISubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !4, scope: !8, type: !15, variables: !17) -!15 = !DISubroutineType(types: !16) -!16 = !{!11} -!17 = !{} ; previously: invalid DW_TAG_base_type -!18 = distinct !DISubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 13, file: !4, scope: null, type: !15, declaration: !14, variables: !1) -!19 = distinct !DISubprogram(name: "global_function", linkageName: "_Z15global_functionv", line: 19, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 19, file: !4, scope: !4, type: !15, variables: !1) -!20 = distinct !DISubprogram(name: "global_namespace_function", linkageName: "_ZN2ns25global_namespace_functionEv", line: 24, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 24, file: !4, scope: !21, type: !22, variables: !1) -!21 = !DINamespace(name: "ns", line: 23, file: !4, scope: null) -!22 = !DISubroutineType(types: !23) -!23 = !{null} -!24 = !{!25, !26, !27} -!25 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "static_member_variable", linkageName: "_ZN1C22static_member_variableE", line: 7, isLocal: false, isDefinition: true, scope: !8, file: !4, type: !11, declaration: !10)) -!26 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "global_variable", line: 17, isLocal: false, isDefinition: true, scope: null, file: !4, type: !8)) -!27 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "global_namespace_variable", linkageName: "_ZN2ns25global_namespace_variableE", line: 27, isLocal: false, isDefinition: true, scope: !21, file: !4, type: !11)) -!28 = !DILocalVariable(name: "this", line: 9, arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !3, file: !4, type: !29) -!29 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !8) -!30 = !DILocation(line: 9, scope: !3) -!31 = !DILocation(line: 10, scope: !3) -!32 = !DILocation(line: 11, scope: !3) -!33 = !DILocation(line: 14, scope: !18) -!34 = !DILocation(line: 20, scope: !19) -!35 = !DILocation(line: 25, scope: !20) -!36 = !DILocation(line: 26, scope: !20) -!37 = !DIFile(filename: "dwarf-public-names.cpp", directory: "/usr2/kparzysz/s.hex/t") -!38 = !{i32 1, !"Debug Info Version", i32 3} diff --git a/llvm/test/DebugInfo/Generic/enum.ll b/llvm/test/DebugInfo/Generic/enum.ll index ef00b2f84e0..f3875700f6e 100644 --- a/llvm/test/DebugInfo/Generic/enum.ll +++ b/llvm/test/DebugInfo/Generic/enum.ll @@ -33,15 +33,17 @@ ; CHECK: DW_TAG_enumerator ; CHECK-NEXT: DW_AT_name{{.*}} = "X" -@a = global i64 0, align 8, !dbg !18 +source_filename = "test/DebugInfo/Generic/enum.ll" + +@a = global i64 0, align 8, !dbg !0 ; Function Attrs: nounwind uwtable -define void @_Z4funcv() #0 !dbg !13 { +define void @_Z4funcv() #0 !dbg !17 { entry: %b = alloca i32, align 4 - call void @llvm.dbg.declare(metadata i32* %b, metadata !20, metadata !DIExpression()), !dbg !22 - store i32 0, i32* %b, align 4, !dbg !22 - ret void, !dbg !23 + call void @llvm.dbg.declare(metadata i32* %b, metadata !20, metadata !22), !dbg !23 + store i32 0, i32* %b, align 4, !dbg !23 + ret void, !dbg !24 } ; Function Attrs: nounwind readnone @@ -50,30 +52,32 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 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" "unsafe-fp-math"="false" "use-soft-float"="false" } attributes #1 = { nounwind readnone } -!llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!19, !24} +!llvm.dbg.cu = !{!8} +!llvm.module.flags = !{!15, !16} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !11, globals: !17, imports: !11) -!1 = !DIFile(filename: "enum.cpp", directory: "/tmp") -!2 = !{!3, !8} -!3 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "e1", line: 1, size: 64, align: 64, file: !1, elements: !4) +!0 = !DIGlobalVariableExpression(var: !1) +!1 = !DIGlobalVariable(name: "a", scope: null, file: !2, line: 1, type: !3, isLocal: false, isDefinition: true) +!2 = !DIFile(filename: "enum.cpp", directory: "/tmp") +!3 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "e1", file: !2, line: 1, size: 64, align: 64, elements: !4) !4 = !{!5, !6, !7} -!5 = !DIEnumerator(name: "I", value: 0) ; [ DW_TAG_enumerator ] [I :: 0] -!6 = !DIEnumerator(name: "J", value: 4294967295) ; [ DW_TAG_enumerator ] [J :: 4294967295] -!7 = !DIEnumerator(name: "K", value: -1152921504606846976) ; [ DW_TAG_enumerator ] [K :: 17293822569102704640] -!8 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "e2", line: 2, size: 32, align: 32, file: !1, elements: !9) -!9 = !{!10} -!10 = !DIEnumerator(name: "X", value: 0) ; [ DW_TAG_enumerator ] [X :: 0] -!11 = !{} -!13 = distinct !DISubprogram(name: "func", linkageName: "_Z4funcv", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !14, type: !15, variables: !11) -!14 = !DIFile(filename: "enum.cpp", directory: "/tmp") -!15 = !DISubroutineType(types: !16) -!16 = !{null} -!17 = !{!18} -!18 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "a", line: 1, isLocal: false, isDefinition: true, scope: null, file: !14, type: !3)) -!19 = !{i32 2, !"Dwarf Version", i32 3} -!20 = !DILocalVariable(name: "b", line: 4, scope: !13, file: !14, type: !21) -!21 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!22 = !DILocation(line: 4, scope: !13) -!23 = !DILocation(line: 5, scope: !13) -!24 = !{i32 1, !"Debug Info Version", i32 3} +!5 = !DIEnumerator(name: "I", value: 0) +!6 = !DIEnumerator(name: "J", value: 4294967295) ; [ DW_TAG_enumerator ] [I :: 0] +!7 = !DIEnumerator(name: "K", value: -1152921504606846976) ; [ DW_TAG_enumerator ] [J :: 4294967295] +!8 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 3.4 ", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !9, retainedTypes: !13, globals: !14, imports: !13) ; [ DW_TAG_enumerator ] [K :: 17293822569102704640] +!9 = !{!3, !10} +!10 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "e2", file: !2, line: 2, size: 32, align: 32, elements: !11) +!11 = !{!12} +!12 = !DIEnumerator(name: "X", value: 0) ; [ DW_TAG_enumerator ] [X :: 0] +!13 = !{} +!14 = !{!0} +!15 = !{i32 2, !"Dwarf Version", i32 3} +!16 = !{i32 1, !"Debug Info Version", i32 3} +!17 = distinct !DISubprogram(name: "func", linkageName: "_Z4funcv", scope: !2, file: !2, line: 3, type: !18, isLocal: false, isDefinition: true, scopeLine: 3, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !8, variables: !13) +!18 = !DISubroutineType(types: !19) +!19 = !{null} +!20 = !DILocalVariable(name: "b", scope: !17, file: !2, line: 4, type: !21) +!21 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) +!22 = !DIExpression() +!23 = !DILocation(line: 4, scope: !17) +!24 = !DILocation(line: 5, scope: !17) + diff --git a/llvm/test/DebugInfo/Generic/global.ll b/llvm/test/DebugInfo/Generic/global.ll index 8b32c02e62e..5ba1238a66f 100644 --- a/llvm/test/DebugInfo/Generic/global.ll +++ b/llvm/test/DebugInfo/Generic/global.ll @@ -15,8 +15,10 @@ ; CHECK: debug_info contents ; CHECK: DW_TAG_variable +source_filename = "test/DebugInfo/Generic/global.ll" + ; Function Attrs: nounwind readnone uwtable -define i32 @main() #0 !dbg !4 { +define i32 @main() #0 !dbg !9 { entry: ret i32 0, !dbg !12 } @@ -24,18 +26,19 @@ entry: attributes #0 = { nounwind readnone uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" } !llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!11, !13} +!llvm.module.flags = !{!7, !8} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !9, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.4 ", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !3, imports: !2) !1 = !DIFile(filename: "global.cpp", directory: "/tmp") !2 = !{} -!4 = distinct !DISubprogram(name: "main", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) -!5 = !DIFile(filename: "global.cpp", directory: "/tmp") -!6 = !DISubroutineType(types: !7) -!7 = !{!8} -!8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!9 = !{!10} -!10 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "i", linkageName: "_ZL1i", line: 1, isLocal: true, isDefinition: true, scope: null, file: !5, type: !8)) -!11 = !{i32 2, !"Dwarf Version", i32 3} -!12 = !DILocation(line: 4, scope: !4) -!13 = !{i32 1, !"Debug Info Version", i32 3} +!3 = !{!4} +!4 = !DIGlobalVariableExpression(var: !5) +!5 = !DIGlobalVariable(name: "i", linkageName: "_ZL1i", scope: null, file: !1, line: 1, type: !6, isLocal: true, isDefinition: true) +!6 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) +!7 = !{i32 2, !"Dwarf Version", i32 3} +!8 = !{i32 1, !"Debug Info Version", i32 3} +!9 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 2, type: !10, isLocal: false, isDefinition: true, scopeLine: 2, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !2) +!10 = !DISubroutineType(types: !11) +!11 = !{!6} +!12 = !DILocation(line: 4, scope: !9) + diff --git a/llvm/test/DebugInfo/Generic/gvn.ll b/llvm/test/DebugInfo/Generic/gvn.ll index 2120ed72b07..a7e858fa007 100644 --- a/llvm/test/DebugInfo/Generic/gvn.ll +++ b/llvm/test/DebugInfo/Generic/gvn.ll @@ -13,101 +13,95 @@ ; a = f2(1); ; f1(&a); ; } +source_filename = "test/DebugInfo/Generic/gvn.ll" target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" target triple = "arm64-apple-ios" -@a = common global i32 0, align 4, !dbg !16 -@b = common global i32 0, align 4, !dbg !17 +@a = common global i32 0, align 4, !dbg !0 +@b = common global i32 0, align 4, !dbg !6 ; Function Attrs: nounwind define void @f3() #0 !dbg !12 { entry: ; Verify that the call still has a debug location after GVN. ; CHECK: %call = tail call i32 @f2(i32 1) #{{[0-9]}}, !dbg - %call = tail call i32 @f2(i32 1) #3, !dbg !36 - store i32 %call, i32* @a, align 4, !dbg !36, !tbaa !25 - tail call void @llvm.dbg.value(metadata i32* @a, i64 0, metadata !11, metadata !21) #3, !dbg !39 - %0 = load i32, i32* @b, align 4, !dbg !39, !tbaa !25 - %tobool.i = icmp eq i32 %0, 0, !dbg !39 - br i1 %tobool.i, label %if.end.i, label %land.lhs.true.i.thread, !dbg !40 + %call = tail call i32 @f2(i32 1) #0, !dbg !15 + store i32 %call, i32* @a, align 4, !dbg !15, !tbaa !24 + tail call void @llvm.dbg.value(metadata i32* @a, i64 0, metadata !22, metadata !28) #0, !dbg !29 + %0 = load i32, i32* @b, align 4, !dbg !29, !tbaa !24 + %tobool.i = icmp eq i32 %0, 0, !dbg !29 + br i1 %tobool.i, label %if.end.i, label %land.lhs.true.i.thread, !dbg !30 land.lhs.true.i.thread: ; preds = %entry - store i32 1, i32* @a, align 4, !dbg !41, !tbaa !25 - br label %if.then.3.i, !dbg !42 + store i32 1, i32* @a, align 4, !dbg !32, !tbaa !24 + br label %if.then.3.i, !dbg !33 -if.end.i: ; preds = %entry ; This instruction has no debug location -- in this ; particular case it was removed by a bug in SimplifyCFG. +if.end.i: ; preds = %entry %.pr = load i32, i32* @a, align 4 - ; GVN is supposed to replace the load of %.pr with a direct reference to %call. ; CHECK: %tobool2.i = icmp eq i32 %call, 0, !dbg - %tobool2.i = icmp eq i32 %.pr, 0, !dbg !43 - br i1 %tobool2.i, label %f1.exit, label %if.then.3.i, !dbg !43 + %tobool2.i = icmp eq i32 %.pr, 0, !dbg !34 + br i1 %tobool2.i, label %f1.exit, label %if.then.3.i, !dbg !34 if.then.3.i: ; preds = %if.end.i, %land.lhs.true.i.thread - %call.i = tail call i32 bitcast (i32 (...)* @f4 to i32 ()*)() #3, !dbg !44 - br label %f1.exit, !dbg !44 + %call.i = tail call i32 bitcast (i32 (...)* @f4 to i32 ()*)() #0, !dbg !35 + br label %f1.exit, !dbg !35 -f1.exit: ; preds = %if.end.i, %if.then.3.i - ret void, !dbg !45 +f1.exit: ; preds = %if.then.3.i, %if.end.i + ret void, !dbg !36 } declare i32 @f2(i32) + declare i32 @f4(...) ; Function Attrs: nounwind readnone -declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #2 +declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #1 attributes #0 = { nounwind } -attributes #2 = { nounwind readnone } -attributes #3 = { nounwind } +attributes #1 = { nounwind readnone } -!llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!18, !19} -!llvm.ident = !{!20} +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!9, !10} +!llvm.ident = !{!11} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 245562) (llvm/trunk 245569)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, globals: !15) -!1 = !DIFile(filename: "test.c", directory: "/") -!2 = !{} -!4 = distinct !DISubprogram(name: "f1", scope: !1, file: !1, line: 2, type: !6, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !10) -!6 = !DISubroutineType(types: !7) -!7 = !{null, !8} -!8 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !9, size: 64, align: 64) -!9 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!10 = !{!11} -!11 = !DILocalVariable(name: "p1", arg: 1, scope: !4, file: !1, line: 2, type: !8) -!12 = distinct !DISubprogram(name: "f3", scope: !1, file: !1, line: 9, type: !13, isLocal: false, isDefinition: true, scopeLine: 9, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !2) +!0 = !DIGlobalVariableExpression(var: !1) +!1 = !DIGlobalVariable(name: "a", scope: !2, file: !3, line: 1, type: !8, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 3.8.0 (trunk 245562) (llvm/trunk 245569)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5) +!3 = !DIFile(filename: "test.c", directory: "/") +!4 = !{} +!5 = !{!0, !6} +!6 = !DIGlobalVariableExpression(var: !7) +!7 = !DIGlobalVariable(name: "b", scope: !2, file: !3, line: 1, type: !8, isLocal: false, isDefinition: true) +!8 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) +!9 = !{i32 2, !"Dwarf Version", i32 2} +!10 = !{i32 2, !"Debug Info Version", i32 3} +!11 = !{!"clang version 3.8.0 (trunk 245562) (llvm/trunk 245569)"} +!12 = distinct !DISubprogram(name: "f3", scope: !3, file: !3, line: 9, type: !13, isLocal: false, isDefinition: true, scopeLine: 9, flags: DIFlagPrototyped, isOptimized: true, unit: !2, variables: !4) !13 = !DISubroutineType(types: !14) !14 = !{null} -!15 = !{!16, !17} -!16 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "a", scope: !0, file: !1, line: 1, type: !9, isLocal: false, isDefinition: true)) -!17 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "b", scope: !0, file: !1, line: 1, type: !9, isLocal: false, isDefinition: true)) -!18 = !{i32 2, !"Dwarf Version", i32 2} -!19 = !{i32 2, !"Debug Info Version", i32 3} -!20 = !{!"clang version 3.8.0 (trunk 245562) (llvm/trunk 245569)"} -!21 = !DIExpression() -!22 = !DILocation(line: 2, scope: !4) -!23 = !DILocation(line: 3, scope: !24) -!24 = distinct !DILexicalBlock(scope: !4, file: !1, line: 3) -!25 = !{!26, !26, i64 0} -!26 = !{!"int", !27, i64 0} -!27 = !{!"omnipotent char", !28, i64 0} -!28 = !{!"Simple C/C++ TBAA"} -!29 = !DILocation(line: 3, scope: !4) -!30 = !DILocation(line: 4, scope: !24) -!31 = !DILocation(line: 5, scope: !32) -!32 = distinct !DILexicalBlock(scope: !4, file: !1, line: 5) -!33 = !DILocation(line: 5, scope: !4) -!34 = !DILocation(line: 6, scope: !32) -!35 = !DILocation(line: 7, scope: !4) -!36 = !DILocation(line: 5, scope: !32, inlinedAt: !37) -!37 = distinct !DILocation(line: 11, scope: !12) -!38 = !DILocation(line: 10, scope: !12) -!39 = !DILocation(line: 2, scope: !4, inlinedAt: !37) -!40 = !DILocation(line: 3, scope: !24, inlinedAt: !37) -!41 = !DILocation(line: 3, scope: !4, inlinedAt: !37) -!42 = !DILocation(line: 4, scope: !24, inlinedAt: !37) -!43 = !DILocation(line: 5, scope: !4, inlinedAt: !37) -!44 = !DILocation(line: 6, scope: !32, inlinedAt: !37) -!45 = !DILocation(line: 12, scope: !12) +!15 = !DILocation(line: 5, scope: !16, inlinedAt: !23) +!16 = distinct !DILexicalBlock(scope: !17, file: !3, line: 5) +!17 = distinct !DISubprogram(name: "f1", scope: !3, file: !3, line: 2, type: !18, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, unit: !2, variables: !21) +!18 = !DISubroutineType(types: !19) +!19 = !{null, !20} +!20 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !8, size: 64, align: 64) +!21 = !{!22} +!22 = !DILocalVariable(name: "p1", arg: 1, scope: !17, file: !3, line: 2, type: !20) +!23 = distinct !DILocation(line: 11, scope: !12) +!24 = !{!25, !25, i64 0} +!25 = !{!"int", !26, i64 0} +!26 = !{!"omnipotent char", !27, i64 0} +!27 = !{!"Simple C/C++ TBAA"} +!28 = !DIExpression() +!29 = !DILocation(line: 2, scope: !17, inlinedAt: !23) +!30 = !DILocation(line: 3, scope: !31, inlinedAt: !23) +!31 = distinct !DILexicalBlock(scope: !17, file: !3, line: 3) +!32 = !DILocation(line: 3, scope: !17, inlinedAt: !23) +!33 = !DILocation(line: 4, scope: !31, inlinedAt: !23) +!34 = !DILocation(line: 5, scope: !17, inlinedAt: !23) +!35 = !DILocation(line: 6, scope: !16, inlinedAt: !23) +!36 = !DILocation(line: 12, scope: !12) + diff --git a/llvm/test/DebugInfo/Generic/member-pointers.ll b/llvm/test/DebugInfo/Generic/member-pointers.ll index b9fc9b335bb..3cfb54af6b9 100644 --- a/llvm/test/DebugInfo/Generic/member-pointers.ll +++ b/llvm/test/DebugInfo/Generic/member-pointers.ll @@ -17,24 +17,28 @@ ; int S::*x = 0; ; void (S::*y)(int) = 0; -@x = global i64 -1, align 8, !dbg !5 -@y = global { i64, i64 } zeroinitializer, align 8, !dbg !10 +source_filename = "test/DebugInfo/Generic/member-pointers.ll" -!llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!16} +@x = global i64 -1, align 8, !dbg !0 +@y = global { i64, i64 } zeroinitializer, align 8, !dbg !7 + +!llvm.dbg.cu = !{!13} +!llvm.module.flags = !{!15} + +!0 = !DIGlobalVariableExpression(var: !1) +!1 = !DIGlobalVariable(name: "x", scope: null, file: !2, line: 4, type: !3, isLocal: false, isDefinition: true) +!2 = !DIFile(filename: "simple.cpp", directory: "/home/blaikie/Development/scratch") +!3 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !4, extraData: !5) +!4 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) +!5 = !DICompositeType(tag: DW_TAG_structure_type, name: "S", file: !2, line: 1, size: 8, align: 8, elements: !6) +!6 = !{} +!7 = !DIGlobalVariableExpression(var: !8) +!8 = !DIGlobalVariable(name: "y", scope: null, file: !2, line: 5, type: !9, isLocal: false, isDefinition: true) +!9 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !10, extraData: !5) +!10 = !DISubroutineType(types: !11) +!11 = !{null, !12, !4} +!12 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !5, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer) +!13 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 3.3 ", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !6, retainedTypes: !6, globals: !14, imports: !6) +!14 = !{!0, !7} +!15 = !{i32 1, !"Debug Info Version", i32 3} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 ", isOptimized: false, emissionKind: FullDebug, file: !15, enums: !1, retainedTypes: !1, globals: !3, imports: !1) -!1 = !{} -!3 = !{!5, !10} -!5 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "x", line: 4, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7)) -!6 = !DIFile(filename: "simple.cpp", directory: "/home/blaikie/Development/scratch") -!7 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !8, extraData: !9) -!8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!9 = !DICompositeType(tag: DW_TAG_structure_type, name: "S", line: 1, size: 8, align: 8, file: !15, elements: !1) -!10 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "y", line: 5, isLocal: false, isDefinition: true, scope: null, file: !6, type: !11)) -!11 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !12, extraData: !9) -!12 = !DISubroutineType(types: !13) -!13 = !{null, !14, !8} -!14 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !9) -!15 = !DIFile(filename: "simple.cpp", directory: "/home/blaikie/Development/scratch") -!16 = !{i32 1, !"Debug Info Version", i32 3} diff --git a/llvm/test/DebugInfo/Generic/recursive_inlining.ll b/llvm/test/DebugInfo/Generic/recursive_inlining.ll index f01b2c3c74e..9afa8aea61a 100644 --- a/llvm/test/DebugInfo/Generic/recursive_inlining.ll +++ b/llvm/test/DebugInfo/Generic/recursive_inlining.ll @@ -84,105 +84,107 @@ ; CHECK-NOT: DW_TAG ; CHECK: DW_AT_abstract_origin {{.*}} {[[M_FN2_THIS_ABS_DEF]]} - +source_filename = "test/DebugInfo/Generic/recursive_inlining.ll" %struct.C = type { i32 } -@x = global %struct.C* null, align 8, !dbg !27 +@x = global %struct.C* null, align 8, !dbg !0 ; Function Attrs: nounwind -define void @_Z3fn6v() #0 !dbg !14 { +define void @_Z3fn6v() #0 !dbg !20 { entry: - tail call void @_Z3fn8v() #3, !dbg !31 - %0 = load %struct.C*, %struct.C** @x, align 8, !dbg !32, !tbaa !33 - tail call void @llvm.dbg.value(metadata %struct.C* %0, i64 0, metadata !37, metadata !DIExpression()) #3, !dbg !38 - tail call void @_Z3fn8v() #3, !dbg !39 - %b.i = getelementptr inbounds %struct.C, %struct.C* %0, i64 0, i32 0, !dbg !40 - %1 = load i32, i32* %b.i, align 4, !dbg !40, !tbaa !42 - %tobool.i = icmp eq i32 %1, 0, !dbg !40 - br i1 %tobool.i, label %_ZN1C5m_fn2Ev.exit, label %if.then.i, !dbg !40 + tail call void @_Z3fn8v() #3, !dbg !23 + %0 = load %struct.C*, %struct.C** @x, align 8, !dbg !24, !tbaa !25 + tail call void @llvm.dbg.value(metadata %struct.C* %0, i64 0, metadata !29, metadata !32) #3, !dbg !33 + tail call void @_Z3fn8v() #3, !dbg !34 + %b.i = getelementptr inbounds %struct.C, %struct.C* %0, i64 0, i32 0, !dbg !35 + %1 = load i32, i32* %b.i, align 4, !dbg !35, !tbaa !37 + %tobool.i = icmp eq i32 %1, 0, !dbg !35 + br i1 %tobool.i, label %_ZN1C5m_fn2Ev.exit, label %if.then.i, !dbg !35 if.then.i: ; preds = %entry - tail call void @_Z3fn2iiii(i32 0, i32 0, i32 0, i32 0) #3, !dbg !45 - br label %_ZN1C5m_fn2Ev.exit, !dbg !45 + tail call void @_Z3fn2iiii(i32 0, i32 0, i32 0, i32 0) #3, !dbg !40 + br label %_ZN1C5m_fn2Ev.exit, !dbg !40 -_ZN1C5m_fn2Ev.exit: ; preds = %entry, %if.then.i - tail call void @_Z3fn3v() #3, !dbg !47 - ret void, !dbg !48 +_ZN1C5m_fn2Ev.exit: ; preds = %if.then.i, %entry + tail call void @_Z3fn3v() #3, !dbg !42 + ret void, !dbg !43 } declare void @_Z3fn8v() #1 ; Function Attrs: nounwind -define linkonce_odr void @_ZN1C5m_fn2Ev(%struct.C* nocapture readonly %this) #0 align 2 !dbg !22 { + +define linkonce_odr void @_ZN1C5m_fn2Ev(%struct.C* nocapture readonly %this) #0 align 2 !dbg !30 { entry: - tail call void @llvm.dbg.value(metadata %struct.C* %this, i64 0, metadata !24, metadata !DIExpression()), !dbg !49 - tail call void @_Z3fn8v() #3, !dbg !50 - %b = getelementptr inbounds %struct.C, %struct.C* %this, i64 0, i32 0, !dbg !51 - %0 = load i32, i32* %b, align 4, !dbg !51, !tbaa !42 - %tobool = icmp eq i32 %0, 0, !dbg !51 - br i1 %tobool, label %if.end, label %if.then, !dbg !51 + tail call void @llvm.dbg.value(metadata %struct.C* %this, i64 0, metadata !29, metadata !32), !dbg !44 + tail call void @_Z3fn8v() #3, !dbg !45 + %b = getelementptr inbounds %struct.C, %struct.C* %this, i64 0, i32 0, !dbg !46 + %0 = load i32, i32* %b, align 4, !dbg !46, !tbaa !37 + %tobool = icmp eq i32 %0, 0, !dbg !46 + br i1 %tobool, label %if.end, label %if.then, !dbg !46 if.then: ; preds = %entry - tail call void @_Z3fn2iiii(i32 0, i32 0, i32 0, i32 0) #3, !dbg !52 - br label %if.end, !dbg !52 - -if.end: ; preds = %entry, %if.then - tail call void @_Z3fn8v() #3, !dbg !53 - %1 = load %struct.C*, %struct.C** @x, align 8, !dbg !56, !tbaa !33 - tail call void @llvm.dbg.value(metadata %struct.C* %1, i64 0, metadata !57, metadata !DIExpression()) #3, !dbg !58 - tail call void @_Z3fn8v() #3, !dbg !59 - %b.i.i = getelementptr inbounds %struct.C, %struct.C* %1, i64 0, i32 0, !dbg !60 - %2 = load i32, i32* %b.i.i, align 4, !dbg !60, !tbaa !42 - %tobool.i.i = icmp eq i32 %2, 0, !dbg !60 - br i1 %tobool.i.i, label %_Z3fn6v.exit, label %if.then.i.i, !dbg !60 + tail call void @_Z3fn2iiii(i32 0, i32 0, i32 0, i32 0) #3, !dbg !47 + br label %if.end, !dbg !47 + +if.end: ; preds = %if.then, %entry + tail call void @_Z3fn8v() #3, !dbg !48 + %1 = load %struct.C*, %struct.C** @x, align 8, !dbg !52, !tbaa !25 + tail call void @llvm.dbg.value(metadata %struct.C* %1, i64 0, metadata !29, metadata !32) #3, !dbg !53 + tail call void @_Z3fn8v() #3, !dbg !54 + %b.i.i = getelementptr inbounds %struct.C, %struct.C* %1, i64 0, i32 0, !dbg !55 + %2 = load i32, i32* %b.i.i, align 4, !dbg !55, !tbaa !37 + %tobool.i.i = icmp eq i32 %2, 0, !dbg !55 + br i1 %tobool.i.i, label %_Z3fn6v.exit, label %if.then.i.i, !dbg !55 if.then.i.i: ; preds = %if.end - tail call void @_Z3fn2iiii(i32 0, i32 0, i32 0, i32 0) #3, !dbg !61 - br label %_Z3fn6v.exit, !dbg !61 -_Z3fn6v.exit: ; preds = %if.end, %if.then.i.i - tail call void @_Z3fn3v() #3, !dbg !62 - ret void, !dbg !63 + tail call void @_Z3fn2iiii(i32 0, i32 0, i32 0, i32 0) #3, !dbg !56 + br label %_Z3fn6v.exit, !dbg !56 + +_Z3fn6v.exit: ; preds = %if.then.i.i, %if.end + tail call void @_Z3fn3v() #3, !dbg !57 + ret void, !dbg !58 } ; Function Attrs: nounwind -define void @_Z3fn3v() #0 !dbg !18 { +define void @_Z3fn3v() #0 !dbg !50 { entry: br label %tailrecurse tailrecurse: ; preds = %tailrecurse.backedge, %entry - tail call void @_Z3fn8v() #3, !dbg !64 - %0 = load %struct.C*, %struct.C** @x, align 8, !dbg !66, !tbaa !33 - tail call void @llvm.dbg.value(metadata %struct.C* %0, i64 0, metadata !67, metadata !DIExpression()) #3, !dbg !68 - tail call void @_Z3fn8v() #3, !dbg !69 - %b.i.i = getelementptr inbounds %struct.C, %struct.C* %0, i64 0, i32 0, !dbg !70 - %1 = load i32, i32* %b.i.i, align 4, !dbg !70, !tbaa !42 - %tobool.i.i = icmp eq i32 %1, 0, !dbg !70 - br i1 %tobool.i.i, label %tailrecurse.backedge, label %if.then.i.i, !dbg !70 - -tailrecurse.backedge: ; preds = %tailrecurse, %if.then.i.i + tail call void @_Z3fn8v() #3, !dbg !59 + %0 = load %struct.C*, %struct.C** @x, align 8, !dbg !61, !tbaa !25 + tail call void @llvm.dbg.value(metadata %struct.C* %0, i64 0, metadata !29, metadata !32) #3, !dbg !62 + tail call void @_Z3fn8v() #3, !dbg !63 + %b.i.i = getelementptr inbounds %struct.C, %struct.C* %0, i64 0, i32 0, !dbg !64 + %1 = load i32, i32* %b.i.i, align 4, !dbg !64, !tbaa !37 + %tobool.i.i = icmp eq i32 %1, 0, !dbg !64 + br i1 %tobool.i.i, label %tailrecurse.backedge, label %if.then.i.i, !dbg !64 + +tailrecurse.backedge: ; preds = %if.then.i.i, %tailrecurse br label %tailrecurse if.then.i.i: ; preds = %tailrecurse - tail call void @_Z3fn2iiii(i32 0, i32 0, i32 0, i32 0) #3, !dbg !71 - br label %tailrecurse.backedge, !dbg !71 + tail call void @_Z3fn2iiii(i32 0, i32 0, i32 0, i32 0) #3, !dbg !65 + br label %tailrecurse.backedge, !dbg !65 } ; Function Attrs: nounwind -define void @_Z3fn4v() #0 !dbg !19 { +define void @_Z3fn4v() #0 !dbg !66 { entry: - %0 = load %struct.C*, %struct.C** @x, align 8, !dbg !72, !tbaa !33 - tail call void @_ZN1C5m_fn2Ev(%struct.C* %0), !dbg !72 - ret void, !dbg !72 + %0 = load %struct.C*, %struct.C** @x, align 8, !dbg !67, !tbaa !25 + tail call void @_ZN1C5m_fn2Ev(%struct.C* %0), !dbg !67 + ret void, !dbg !67 } ; Function Attrs: nounwind -define void @_Z3fn5v() #0 !dbg !20 { +define void @_Z3fn5v() #0 !dbg !68 { entry: - %0 = load %struct.C*, %struct.C** @x, align 8, !dbg !73, !tbaa !33 - tail call void @_ZN1C5m_fn2Ev(%struct.C* %0), !dbg !73 - ret void, !dbg !73 + %0 = load %struct.C*, %struct.C** @x, align 8, !dbg !69, !tbaa !25 + tail call void @_ZN1C5m_fn2Ev(%struct.C* %0), !dbg !69 + ret void, !dbg !69 } declare void @_Z3fn2iiii(i32, i32, i32, i32) #1 @@ -195,80 +197,78 @@ attributes #1 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" " attributes #2 = { nounwind readnone } attributes #3 = { nounwind } -!llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!28, !29} -!llvm.ident = !{!30} - -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !26, imports: !2) -!1 = !DIFile(filename: "<stdin>", directory: "/usr/local/google/home/blaikie/dev/scratch/missing_concrete_variable_on_darwin/reduce") -!2 = !{} -!3 = !{!4} -!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "C", line: 5, size: 32, align: 32, file: !5, elements: !6, identifier: "_ZTS1C") -!5 = !DIFile(filename: "recursive_inlining.cpp", directory: "/usr/local/google/home/blaikie/dev/scratch/missing_concrete_variable_on_darwin/reduce") -!6 = !{!7, !9} -!7 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 6, size: 32, align: 32, file: !5, scope: !4, baseType: !8) -!8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!9 = !DISubprogram(name: "m_fn2", linkageName: "_ZN1C5m_fn2Ev", line: 7, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 7, file: !5, scope: !4, type: !10) -!10 = !DISubroutineType(types: !11) -!11 = !{null, !12} -!12 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4) -!14 = distinct !DISubprogram(name: "fn6", linkageName: "_Z3fn6v", line: 15, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 15, file: !5, scope: !15, type: !16, variables: !2) -!15 = !DIFile(filename: "recursive_inlining.cpp", directory: "/usr/local/google/home/blaikie/dev/scratch/missing_concrete_variable_on_darwin/reduce") -!16 = !DISubroutineType(types: !17) -!17 = !{null} -!18 = distinct !DISubprogram(name: "fn3", linkageName: "_Z3fn3v", line: 20, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 20, file: !5, scope: !15, type: !16, variables: !2) -!19 = distinct !DISubprogram(name: "fn4", linkageName: "_Z3fn4v", line: 21, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 21, file: !5, scope: !15, type: !16, variables: !2) -!20 = distinct !DISubprogram(name: "fn5", linkageName: "_Z3fn5v", line: 22, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 22, file: !5, scope: !15, type: !16, variables: !2) -!21 = distinct !DISubprogram(name: "fn7", linkageName: "_Z3fn7v", line: 14, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 14, file: !5, scope: !15, type: !16, variables: !2) -!22 = distinct !DISubprogram(name: "m_fn2", linkageName: "_ZN1C5m_fn2Ev", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 7, file: !5, scope: !4, type: !10, declaration: !9, variables: !23) -!23 = !{!24} -!24 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !22, type: !25) -!25 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !4) -!26 = !{!27} -!27 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "x", line: 13, isLocal: false, isDefinition: true, scope: null, file: !15, type: !25)) -!28 = !{i32 2, !"Dwarf Version", i32 4} -!29 = !{i32 2, !"Debug Info Version", i32 3} -!30 = !{!"clang version 3.6.0 "} -!31 = !DILocation(line: 16, scope: !14) -!32 = !DILocation(line: 17, scope: !14) -!33 = !{!34, !34, i64 0} -!34 = !{!"any pointer", !35, i64 0} -!35 = !{!"omnipotent char", !36, i64 0} -!36 = !{!"Simple C/C++ TBAA"} -!37 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !22, type: !25) -!38 = !DILocation(line: 0, scope: !22, inlinedAt: !32) -!39 = !DILocation(line: 8, scope: !22, inlinedAt: !32) -!40 = !DILocation(line: 9, scope: !41, inlinedAt: !32) -!41 = distinct !DILexicalBlock(line: 9, column: 0, file: !5, scope: !22) -!42 = !{!43, !44, i64 0} -!43 = !{!4, !44, i64 0} -!44 = !{!"int", !35, i64 0} -!45 = !DILocation(line: 9, scope: !46, inlinedAt: !32) -!46 = distinct !DILexicalBlock(line: 9, column: 0, file: !5, scope: !41) -!47 = !DILocation(line: 10, scope: !22, inlinedAt: !32) -!48 = !DILocation(line: 19, scope: !14) -!49 = !DILocation(line: 0, scope: !22) -!50 = !DILocation(line: 8, scope: !22) -!51 = !DILocation(line: 9, scope: !41) -!52 = !DILocation(line: 9, scope: !46) -!53 = !DILocation(line: 16, scope: !14, inlinedAt: !54) -!54 = !DILocation(line: 20, scope: !18, inlinedAt: !55) -!55 = !DILocation(line: 10, scope: !22) -!56 = !DILocation(line: 17, scope: !14, inlinedAt: !54) -!57 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !22, type: !25) -!58 = !DILocation(line: 0, scope: !22, inlinedAt: !56) -!59 = !DILocation(line: 8, scope: !22, inlinedAt: !56) -!60 = !DILocation(line: 9, scope: !41, inlinedAt: !56) -!61 = !DILocation(line: 9, scope: !46, inlinedAt: !56) -!62 = !DILocation(line: 10, scope: !22, inlinedAt: !56) -!63 = !DILocation(line: 11, scope: !22) -!64 = !DILocation(line: 16, scope: !14, inlinedAt: !65) -!65 = !DILocation(line: 20, scope: !18) -!66 = !DILocation(line: 17, scope: !14, inlinedAt: !65) -!67 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !22, type: !25) -!68 = !DILocation(line: 0, scope: !22, inlinedAt: !66) -!69 = !DILocation(line: 8, scope: !22, inlinedAt: !66) -!70 = !DILocation(line: 9, scope: !41, inlinedAt: !66) -!71 = !DILocation(line: 9, scope: !46, inlinedAt: !66) -!72 = !DILocation(line: 21, scope: !19) -!73 = !DILocation(line: 22, scope: !20) +!llvm.dbg.cu = !{!12} +!llvm.module.flags = !{!17, !18} +!llvm.ident = !{!19} + +!0 = !DIGlobalVariableExpression(var: !1) +!1 = !DIGlobalVariable(name: "x", scope: null, file: !2, line: 13, type: !3, isLocal: false, isDefinition: true) +!2 = !DIFile(filename: "recursive_inlining.cpp", directory: "/usr/local/google/home/blaikie/dev/scratch/missing_concrete_variable_on_darwin/reduce") +!3 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !4, size: 64, align: 64) +!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "C", file: !2, line: 5, size: 32, align: 32, elements: !5, identifier: "_ZTS1C") +!5 = !{!6, !8} +!6 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !4, file: !2, line: 6, baseType: !7, size: 32, align: 32) +!7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) +!8 = !DISubprogram(name: "m_fn2", linkageName: "_ZN1C5m_fn2Ev", scope: !4, file: !2, line: 7, type: !9, isLocal: false, isDefinition: false, scopeLine: 7, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true) +!9 = !DISubroutineType(types: !10) +!10 = !{null, !11} +!11 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !4, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer) +!12 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !13, producer: "clang version 3.6.0 ", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !14, retainedTypes: !15, globals: !16, imports: !14) +!13 = !DIFile(filename: "<stdin>", directory: "/usr/local/google/home/blaikie/dev/scratch/missing_concrete_variable_on_darwin/reduce") +!14 = !{} +!15 = !{!4} +!16 = !{!0} +!17 = !{i32 2, !"Dwarf Version", i32 4} +!18 = !{i32 2, !"Debug Info Version", i32 3} +!19 = !{!"clang version 3.6.0 "} +!20 = distinct !DISubprogram(name: "fn6", linkageName: "_Z3fn6v", scope: !2, file: !2, line: 15, type: !21, isLocal: false, isDefinition: true, scopeLine: 15, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !12, variables: !14) +!21 = !DISubroutineType(types: !22) +!22 = !{null} +!23 = !DILocation(line: 16, scope: !20) +!24 = !DILocation(line: 17, scope: !20) +!25 = !{!26, !26, i64 0} +!26 = !{!"any pointer", !27, i64 0} +!27 = !{!"omnipotent char", !28, i64 0} +!28 = !{!"Simple C/C++ TBAA"} +!29 = !DILocalVariable(name: "this", arg: 1, scope: !30, type: !3, flags: DIFlagArtificial | DIFlagObjectPointer) +!30 = distinct !DISubprogram(name: "m_fn2", linkageName: "_ZN1C5m_fn2Ev", scope: !4, file: !2, line: 7, type: !9, isLocal: false, isDefinition: true, scopeLine: 7, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !12, declaration: !8, variables: !31) +!31 = !{!29} +!32 = !DIExpression() +!33 = !DILocation(line: 0, scope: !30, inlinedAt: !24) +!34 = !DILocation(line: 8, scope: !30, inlinedAt: !24) +!35 = !DILocation(line: 9, scope: !36, inlinedAt: !24) +!36 = distinct !DILexicalBlock(scope: !30, file: !2, line: 9) +!37 = !{!38, !39, i64 0} +!38 = !{!4, !39, i64 0} +!39 = !{!"int", !27, i64 0} +!40 = !DILocation(line: 9, scope: !41, inlinedAt: !24) +!41 = distinct !DILexicalBlock(scope: !36, file: !2, line: 9) +!42 = !DILocation(line: 10, scope: !30, inlinedAt: !24) +!43 = !DILocation(line: 19, scope: !20) +!44 = !DILocation(line: 0, scope: !30) +!45 = !DILocation(line: 8, scope: !30) +!46 = !DILocation(line: 9, scope: !36) +!47 = !DILocation(line: 9, scope: !41) +!48 = !DILocation(line: 16, scope: !20, inlinedAt: !49) +!49 = !DILocation(line: 20, scope: !50, inlinedAt: !51) +!50 = distinct !DISubprogram(name: "fn3", linkageName: "_Z3fn3v", scope: !2, file: !2, line: 20, type: !21, isLocal: false, isDefinition: true, scopeLine: 20, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !12, variables: !14) +!51 = !DILocation(line: 10, scope: !30) +!52 = !DILocation(line: 17, scope: !20, inlinedAt: !49) +!53 = !DILocation(line: 0, scope: !30, inlinedAt: !52) +!54 = !DILocation(line: 8, scope: !30, inlinedAt: !52) +!55 = !DILocation(line: 9, scope: !36, inlinedAt: !52) +!56 = !DILocation(line: 9, scope: !41, inlinedAt: !52) +!57 = !DILocation(line: 10, scope: !30, inlinedAt: !52) +!58 = !DILocation(line: 11, scope: !30) +!59 = !DILocation(line: 16, scope: !20, inlinedAt: !60) +!60 = !DILocation(line: 20, scope: !50) +!61 = !DILocation(line: 17, scope: !20, inlinedAt: !60) +!62 = !DILocation(line: 0, scope: !30, inlinedAt: !61) +!63 = !DILocation(line: 8, scope: !30, inlinedAt: !61) +!64 = !DILocation(line: 9, scope: !36, inlinedAt: !61) +!65 = !DILocation(line: 9, scope: !41, inlinedAt: !61) +!66 = distinct !DISubprogram(name: "fn4", linkageName: "_Z3fn4v", scope: !2, file: !2, line: 21, type: !21, isLocal: false, isDefinition: true, scopeLine: 21, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !12, variables: !14) +!67 = !DILocation(line: 21, scope: !66) +!68 = distinct !DISubprogram(name: "fn5", linkageName: "_Z3fn5v", scope: !2, file: !2, line: 22, type: !21, isLocal: false, isDefinition: true, scopeLine: 22, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !12, variables: !14) +!69 = !DILocation(line: 22, scope: !68) + diff --git a/llvm/test/DebugInfo/Generic/template-recursive-void.ll b/llvm/test/DebugInfo/Generic/template-recursive-void.ll index cb22afd01e4..adce4ddbcec 100644 --- a/llvm/test/DebugInfo/Generic/template-recursive-void.ll +++ b/llvm/test/DebugInfo/Generic/template-recursive-void.ll @@ -18,44 +18,47 @@ ; CHECK-NOT: DW_AT_type ; CHECK: NULL +source_filename = "test/DebugInfo/Generic/template-recursive-void.ll" + %class.bar = type { i8 } -@filters = global %class.bar zeroinitializer, align 1, !dbg !4 +@filters = global %class.bar zeroinitializer, align 1, !dbg !0 -!llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!36, !37} +!llvm.dbg.cu = !{!29} +!llvm.module.flags = !{!32, !33} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 (trunk 187958) (llvm/trunk 187964)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !3, imports: !2) -!1 = !DIFile(filename: "debug-info-template-recursive.cpp", directory: "/usr/local/google/home/echristo/tmp") -!2 = !{} -!3 = !{!4} -!4 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "filters", line: 10, isLocal: false, isDefinition: true, scope: null, file: !5, type: !6)) -!5 = !DIFile(filename: "debug-info-template-recursive.cpp", directory: "/usr/local/google/home/echristo/tmp") -!6 = !DICompositeType(tag: DW_TAG_class_type, name: "bar", line: 9, size: 8, align: 8, file: !1, elements: !7) -!7 = !{!8, !31} +!0 = !DIGlobalVariableExpression(var: !1) +!1 = !DIGlobalVariable(name: "filters", scope: null, file: !2, line: 10, type: !3, isLocal: false, isDefinition: true) +!2 = !DIFile(filename: "debug-info-template-recursive.cpp", directory: "/usr/local/google/home/echristo/tmp") +!3 = !DICompositeType(tag: DW_TAG_class_type, name: "bar", file: !2, line: 9, size: 8, align: 8, elements: !4) +!4 = !{!5, !25} +!5 = !DIDerivedType(tag: DW_TAG_inheritance, scope: !3, baseType: !6) +!6 = !DICompositeType(tag: DW_TAG_class_type, name: "foo<void>", file: !2, line: 5, size: 8, align: 8, elements: !7, templateParams: !23) +!7 = !{!8, !15, !20} !8 = !DIDerivedType(tag: DW_TAG_inheritance, scope: !6, baseType: !9) -!9 = !DICompositeType(tag: DW_TAG_class_type, name: "foo<void>", line: 5, size: 8, align: 8, file: !1, elements: !10, templateParams: !29) -!10 = !{!11, !19, !25} -!11 = !DIDerivedType(tag: DW_TAG_inheritance, scope: !9, baseType: !12) -!12 = !DICompositeType(tag: DW_TAG_class_type, name: "base", line: 3, size: 8, align: 8, file: !1, elements: !13) -!13 = !{!14} -!14 = !DISubprogram(name: "base", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !12, type: !15) -!15 = !DISubroutineType(types: !16) -!16 = !{null, !17} -!17 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !12) -!19 = !DISubprogram(name: "operator=", linkageName: "_ZN3fooIvEaSES0_", line: 6, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrivate | DIFlagPrototyped, isOptimized: false, scopeLine: 6, file: !1, scope: !9, type: !20) -!20 = !DISubroutineType(types: !21) -!21 = !{null, !22, !23} -!22 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !9) -!23 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !9) -!25 = !DISubprogram(name: "foo", line: 5, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !1, scope: !9, type: !26) +!9 = !DICompositeType(tag: DW_TAG_class_type, name: "base", file: !2, line: 3, size: 8, align: 8, elements: !10) +!10 = !{!11} +!11 = !DISubprogram(name: "base", scope: !9, file: !2, line: 3, type: !12, isLocal: false, isDefinition: false, scopeLine: 3, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false) +!12 = !DISubroutineType(types: !13) +!13 = !{null, !14} +!14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !9, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer) +!15 = !DISubprogram(name: "operator=", linkageName: "_ZN3fooIvEaSES0_", scope: !6, file: !2, line: 6, type: !16, isLocal: false, isDefinition: false, scopeLine: 6, virtualIndex: 6, flags: DIFlagPrivate | DIFlagPrototyped, isOptimized: false) +!16 = !DISubroutineType(types: !17) +!17 = !{null, !18, !19} +!18 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !6, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer) +!19 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !6) +!20 = !DISubprogram(name: "foo", scope: !6, file: !2, line: 5, type: !21, isLocal: false, isDefinition: false, scopeLine: 5, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false) +!21 = !DISubroutineType(types: !22) +!22 = !{null, !18} +!23 = !{!24} +!24 = !DITemplateTypeParameter(name: "T", type: null) +!25 = !DISubprogram(name: "bar", scope: !3, file: !2, line: 9, type: !26, isLocal: false, isDefinition: false, scopeLine: 9, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false) !26 = !DISubroutineType(types: !27) -!27 = !{null, !22} -!29 = !{!30} -!30 = !DITemplateTypeParameter(name: "T", type: null) -!31 = !DISubprogram(name: "bar", line: 9, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 9, file: !1, scope: !6, type: !32) -!32 = !DISubroutineType(types: !33) -!33 = !{null, !34} -!34 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !6) -!36 = !{i32 2, !"Dwarf Version", i32 3} -!37 = !{i32 1, !"Debug Info Version", i32 3} +!27 = !{null, !28} +!28 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !3, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer) +!29 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 3.4 (trunk 187958) (llvm/trunk 187964)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !30, retainedTypes: !30, globals: !31, imports: !30) +!30 = !{} +!31 = !{!0} +!32 = !{i32 2, !"Dwarf Version", i32 3} +!33 = !{i32 1, !"Debug Info Version", i32 3} + diff --git a/llvm/test/DebugInfo/Generic/tu-member-pointer.ll b/llvm/test/DebugInfo/Generic/tu-member-pointer.ll index 9d057da6559..91ffe94ce67 100644 --- a/llvm/test/DebugInfo/Generic/tu-member-pointer.ll +++ b/llvm/test/DebugInfo/Generic/tu-member-pointer.ll @@ -11,20 +11,23 @@ ; }; ; int Foo:*x = 0; -@x = global i64 -1, align 8, !dbg !6 +source_filename = "test/DebugInfo/Generic/tu-member-pointer.ll" -!llvm.dbg.cu = !{!0} +@x = global i64 -1, align 8, !dbg !0 + +!llvm.dbg.cu = !{!6} !llvm.module.flags = !{!10, !11} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !5, imports: !2) -!1 = !DIFile(filename: "foo.cpp", directory: ".") -!2 = !{} -!3 = !{!4} -!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "Foo", line: 1, flags: DIFlagFwdDecl, file: !1, identifier: "_ZTS3Foo") -!5 = !{!6} -!6 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "x", line: 4, isLocal: false, isDefinition: true, scope: null, file: !7, type: !8)) -!7 = !DIFile(filename: "foo.cpp", directory: ".") -!8 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !9, extraData: !4) -!9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) +!0 = !DIGlobalVariableExpression(var: !1) +!1 = !DIGlobalVariable(name: "x", scope: null, file: !2, line: 4, type: !3, isLocal: false, isDefinition: true) +!2 = !DIFile(filename: "foo.cpp", directory: ".") +!3 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !4, extraData: !5) +!4 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) +!5 = !DICompositeType(tag: DW_TAG_structure_type, name: "Foo", file: !2, line: 1, flags: DIFlagFwdDecl, identifier: "_ZTS3Foo") +!6 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 3.4", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !7, retainedTypes: !8, globals: !9, imports: !7) +!7 = !{} +!8 = !{!5} +!9 = !{!0} !10 = !{i32 2, !"Dwarf Version", i32 2} !11 = !{i32 1, !"Debug Info Version", i32 3} + diff --git a/llvm/test/DebugInfo/Generic/typedef.ll b/llvm/test/DebugInfo/Generic/typedef.ll index bf08bf664f9..cd9663e2ed9 100644 --- a/llvm/test/DebugInfo/Generic/typedef.ll +++ b/llvm/test/DebugInfo/Generic/typedef.ll @@ -12,20 +12,22 @@ ; CHECK-NOT: DW_AT_type ; CHECK: {{DW_TAG|NULL}} -@y = global i8* null, align 8, !dbg !4 +source_filename = "test/DebugInfo/Generic/typedef.ll" -!llvm.dbg.cu = !{!0} +@y = global i8* null, align 8, !dbg !0 + +!llvm.dbg.cu = !{!5} !llvm.module.flags = !{!8, !9} !llvm.ident = !{!10} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !3, imports: !2) -!1 = !DIFile(filename: "typedef.cpp", directory: "/tmp/dbginfo") -!2 = !{} -!3 = !{!4} -!4 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "y", line: 2, isLocal: false, isDefinition: true, scope: null, file: !5, type: !6)) -!5 = !DIFile(filename: "typedef.cpp", directory: "/tmp/dbginfo") -!6 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !7) -!7 = !DIDerivedType(tag: DW_TAG_typedef, name: "x", line: 1, file: !1, baseType: null) +!0 = !DIGlobalVariableExpression(var: !1) +!1 = !DIGlobalVariable(name: "y", scope: null, file: !2, line: 2, type: !3, isLocal: false, isDefinition: true) +!2 = !DIFile(filename: "typedef.cpp", directory: "/tmp/dbginfo") +!3 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !4, size: 64, align: 64) +!4 = !DIDerivedType(tag: DW_TAG_typedef, name: "x", file: !2, line: 1, baseType: null) +!5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 3.5.0 ", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !6, retainedTypes: !6, globals: !7, imports: !6) +!6 = !{} +!7 = !{!0} !8 = !{i32 2, !"Dwarf Version", i32 4} !9 = !{i32 1, !"Debug Info Version", i32 3} !10 = !{!"clang version 3.5.0 "} |

