summaryrefslogtreecommitdiffstats
path: root/llvm/test/DebugInfo/X86/debug-info-static-member.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/DebugInfo/X86/debug-info-static-member.ll')
-rw-r--r--llvm/test/DebugInfo/X86/debug-info-static-member.ll97
1 files changed, 54 insertions, 43 deletions
diff --git a/llvm/test/DebugInfo/X86/debug-info-static-member.ll b/llvm/test/DebugInfo/X86/debug-info-static-member.ll
index 55d6588f2e7..41ec7caca21 100644
--- a/llvm/test/DebugInfo/X86/debug-info-static-member.ll
+++ b/llvm/test/DebugInfo/X86/debug-info-static-member.ll
@@ -36,59 +36,71 @@
; return C::c;
; }
+source_filename = "test/DebugInfo/X86/debug-info-static-member.ll"
+
%class.C = type { i32 }
-@_ZN1C1aE = global i32 4, align 4, !dbg !12
-@_ZN1C1bE = global i32 2, align 4, !dbg !27
-@_ZN1C1cE = global i32 1, align 4, !dbg !28
+@_ZN1C1aE = global i32 4, align 4, !dbg !0
+@_ZN1C1bE = global i32 2, align 4, !dbg !18
+@_ZN1C1cE = global i32 1, align 4, !dbg !20
-define i32 @main() nounwind uwtable !dbg !5 {
+; Function Attrs: nounwind uwtable
+define i32 @main() #0 !dbg !26 {
entry:
%retval = alloca i32, align 4
%instance_C = alloca %class.C, align 4
store i32 0, i32* %retval
- call void @llvm.dbg.declare(metadata %class.C* %instance_C, metadata !29, metadata !DIExpression()), !dbg !30
- %d = getelementptr inbounds %class.C, %class.C* %instance_C, i32 0, i32 0, !dbg !31
- store i32 8, i32* %d, align 4, !dbg !31
- %0 = load i32, i32* @_ZN1C1cE, align 4, !dbg !32
- ret i32 %0, !dbg !32
+ call void @llvm.dbg.declare(metadata %class.C* %instance_C, metadata !29, metadata !30), !dbg !31
+ %d = getelementptr inbounds %class.C, %class.C* %instance_C, i32 0, i32 0, !dbg !32
+ store i32 8, i32* %d, align 4, !dbg !32
+ %0 = load i32, i32* @_ZN1C1cE, align 4, !dbg !33
+ ret i32 %0, !dbg !33
}
-declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
+; Function Attrs: nounwind readnone
+declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
+
+attributes #0 = { nounwind uwtable }
+attributes #1 = { nounwind readnone }
+
+!llvm.dbg.cu = !{!22}
+!llvm.module.flags = !{!25}
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!34}
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "a", linkageName: "_ZN1C1aE", scope: null, file: !2, line: 14, type: !3, isLocal: false, isDefinition: true, declaration: !4)
+!2 = !DIFile(filename: "/usr/local/google/home/blaikie/Development/llvm/src/tools/clang/test/CodeGenCXX/debug-info-static-member.cpp", directory: "/home/blaikie/local/Development/llvm/build/clang/x86-64/Debug/llvm")
+!3 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!4 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !5, file: !2, line: 3, baseType: !3, flags: DIFlagPrivate | DIFlagStaticMember)
+!5 = !DICompositeType(tag: DW_TAG_class_type, name: "C", file: !2, line: 1, size: 32, align: 32, elements: !6)
+!6 = !{!4, !7, !10, !11, !14, !15, !17}
+!7 = !DIDerivedType(tag: DW_TAG_member, name: "const_a", scope: !5, file: !2, line: 4, baseType: !8, flags: DIFlagPrivate | DIFlagStaticMember, extraData: i1 true)
+!8 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !9)
+!9 = !DIBasicType(name: "bool", size: 8, align: 8, encoding: DW_ATE_boolean)
+!10 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !5, file: !2, line: 6, baseType: !3, flags: DIFlagProtected | DIFlagStaticMember)
+!11 = !DIDerivedType(tag: DW_TAG_member, name: "const_b", scope: !5, file: !2, line: 7, baseType: !12, flags: DIFlagProtected | DIFlagStaticMember, extraData: float 0x40091EB860000000)
+!12 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !13)
+!13 = !DIBasicType(name: "float", size: 32, align: 32, encoding: DW_ATE_float)
+!14 = !DIDerivedType(tag: DW_TAG_member, name: "c", scope: !5, file: !2, line: 9, baseType: !3, flags: DIFlagPublic | DIFlagStaticMember)
+!15 = !DIDerivedType(tag: DW_TAG_member, name: "const_c", scope: !5, file: !2, line: 10, baseType: !16, flags: DIFlagPublic | DIFlagStaticMember, extraData: i32 18)
+!16 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !3)
+!17 = !DIDerivedType(tag: DW_TAG_member, name: "d", scope: !5, file: !2, line: 11, baseType: !3, size: 32, align: 32, flags: DIFlagPublic)
+!18 = !DIGlobalVariableExpression(var: !19)
+!19 = !DIGlobalVariable(name: "b", linkageName: "_ZN1C1bE", scope: null, file: !2, line: 15, type: !3, isLocal: false, isDefinition: true, declaration: !10)
+!20 = !DIGlobalVariableExpression(var: !21)
+!21 = !DIGlobalVariable(name: "c", linkageName: "_ZN1C1cE", scope: null, file: !2, line: 16, type: !3, isLocal: false, isDefinition: true, declaration: !14)
+!22 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 3.3 (trunk 171914)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !23, retainedTypes: !23, globals: !24, imports: !23)
+!23 = !{}
+!24 = !{!0, !18, !20}
+!25 = !{i32 1, !"Debug Info Version", i32 3}
+!26 = distinct !DISubprogram(name: "main", scope: !2, file: !2, line: 18, type: !27, isLocal: false, isDefinition: true, scopeLine: 23, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !22, variables: !23)
+!27 = !DISubroutineType(types: !28)
+!28 = !{!3}
+!29 = !DILocalVariable(name: "instance_C", scope: !26, file: !2, line: 20, type: !5)
+!30 = !DIExpression()
+!31 = !DILocation(line: 20, scope: !26)
+!32 = !DILocation(line: 21, scope: !26)
+!33 = !DILocation(line: 22, scope: !26)
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 171914)", isOptimized: false, emissionKind: FullDebug, file: !33, enums: !1, retainedTypes: !1, globals: !10, imports: !1)
-!1 = !{}
-!5 = distinct !DISubprogram(name: "main", line: 18, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 23, file: !33, scope: !6, type: !7, variables: !1)
-!6 = !DIFile(filename: "/usr/local/google/home/blaikie/Development/llvm/src/tools/clang/test/CodeGenCXX/debug-info-static-member.cpp", directory: "/home/blaikie/local/Development/llvm/build/clang/x86-64/Debug/llvm")
-!7 = !DISubroutineType(types: !8)
-!8 = !{!9}
-!9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!10 = !{!12, !27, !28}
-!12 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "a", linkageName: "_ZN1C1aE", line: 14, isLocal: false, isDefinition: true, scope: null, file: !6, type: !9, declaration: !15))
-!13 = !DICompositeType(tag: DW_TAG_class_type, name: "C", line: 1, size: 32, align: 32, file: !33, elements: !14)
-!14 = !{!15, !16, !19, !20, !23, !24, !26}
-!15 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 3, flags: DIFlagPrivate | DIFlagStaticMember, file: !33, scope: !13, baseType: !9)
-!16 = !DIDerivedType(tag: DW_TAG_member, name: "const_a", line: 4, flags: DIFlagPrivate | DIFlagStaticMember, file: !33, scope: !13, baseType: !17, extraData: i1 true)
-!17 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !18)
-!18 = !DIBasicType(tag: DW_TAG_base_type, name: "bool", size: 8, align: 8, encoding: DW_ATE_boolean)
-!19 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 6, flags: DIFlagProtected | DIFlagStaticMember, file: !33, scope: !13, baseType: !9)
-!20 = !DIDerivedType(tag: DW_TAG_member, name: "const_b", line: 7, flags: DIFlagProtected | DIFlagStaticMember, file: !33, scope: !13, baseType: !21, extraData: float 0x40091EB860000000)
-!21 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !22)
-!22 = !DIBasicType(tag: DW_TAG_base_type, name: "float", size: 32, align: 32, encoding: DW_ATE_float)
-!23 = !DIDerivedType(tag: DW_TAG_member, name: "c", line: 9, flags: DIFlagPublic | DIFlagStaticMember, file: !33, scope: !13, baseType: !9)
-!24 = !DIDerivedType(tag: DW_TAG_member, name: "const_c", line: 10, flags: DIFlagPublic | DIFlagStaticMember, file: !33, scope: !13, baseType: !25, extraData: i32 18)
-!25 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !9)
-!26 = !DIDerivedType(tag: DW_TAG_member, name: "d", line: 11, size: 32, align: 32, flags: DIFlagPublic, file: !33, scope: !13, baseType: !9)
-!27 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "b", linkageName: "_ZN1C1bE", line: 15, isLocal: false, isDefinition: true, scope: null, file: !6, type: !9, declaration: !19))
-!28 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "c", linkageName: "_ZN1C1cE", line: 16, isLocal: false, isDefinition: true, scope: null, file: !6, type: !9, declaration: !23))
-!29 = !DILocalVariable(name: "instance_C", line: 20, scope: !5, file: !6, type: !13)
-!30 = !DILocation(line: 20, scope: !5)
-!31 = !DILocation(line: 21, scope: !5)
-!32 = !DILocation(line: 22, scope: !5)
-!33 = !DIFile(filename: "/usr/local/google/home/blaikie/Development/llvm/src/tools/clang/test/CodeGenCXX/debug-info-static-member.cpp", directory: "/home/blaikie/local/Development/llvm/build/clang/x86-64/Debug/llvm")
; PRESENT verifies that static member declarations have these attributes:
; external, declaration, accessibility, and either DW_AT_linkage_name
; (for variables) or DW_AT_const_value (for constants).
@@ -252,4 +264,3 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
; DARWINA-NOT: DW_AT_const_value
; DARWINA-NOT: DW_AT_location
; DARWINA: NULL
-!34 = !{i32 1, !"Debug Info Version", i32 3}
OpenPOWER on IntegriCloud