summaryrefslogtreecommitdiffstats
path: root/llvm/test/DebugInfo/X86/generate-odr-hash.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/DebugInfo/X86/generate-odr-hash.ll')
-rw-r--r--llvm/test/DebugInfo/X86/generate-odr-hash.ll155
1 files changed, 80 insertions, 75 deletions
diff --git a/llvm/test/DebugInfo/X86/generate-odr-hash.ll b/llvm/test/DebugInfo/X86/generate-odr-hash.ll
index c7e1780d3bb..7b3a291f566 100644
--- a/llvm/test/DebugInfo/X86/generate-odr-hash.ll
+++ b/llvm/test/DebugInfo/X86/generate-odr-hash.ll
@@ -69,7 +69,6 @@
; CHECK-NEXT: DW_AT_decl_file
; CHECK-NEXT: DW_AT_decl_line
-
; CHECK: [[WOMBAT:^0x........]]: DW_TAG_structure_type
; CHECK-NEXT: DW_AT_declaration
; CHECK-NEXT: DW_AT_signature {{.*}} (0xfd756cee88f8a118)
@@ -85,7 +84,6 @@
; FISSION-NEXT: DW_AT_name {{.*}} ( indexed {{.*}} "bar"
; SINGLE-NEXT: DW_AT_name {{.*}} "bar"
-
; Check that we generate a hash for fluffy and the value.
; CHECK-NOT: type_signature
; CHECK-LABEL: type_signature = 0xb04af47397402e77
@@ -166,6 +164,8 @@
; OBJ_FISSION-NOT: SHF_GROUP
; OBJ_FISSION: }
+source_filename = "test/DebugInfo/X86/generate-odr-hash.ll"
+
%struct.bar = type { i8 }
%"class.echidna::capybara::mongoose::fluffy" = type { i32, i32 }
%"struct.<anonymous namespace>::walrus" = type { i8 }
@@ -173,103 +173,108 @@
%struct.anon = type { i32, i32 }
%struct.baz = type { i8 }
-@b = global %struct.bar zeroinitializer, align 1, !dbg !39
-@_ZN7echidna8capybara8mongoose6animalE = global %"class.echidna::capybara::mongoose::fluffy" zeroinitializer, align 4, !dbg !40
-@w = internal global %"struct.<anonymous namespace>::walrus" zeroinitializer, align 1, !dbg !41
-@wom = global %struct.wombat zeroinitializer, align 4, !dbg !42
+@b = global %struct.bar zeroinitializer, align 1, !dbg !0
+@_ZN7echidna8capybara8mongoose6animalE = global %"class.echidna::capybara::mongoose::fluffy" zeroinitializer, align 4, !dbg !6
+@w = internal global %"struct.<anonymous namespace>::walrus" zeroinitializer, align 1, !dbg !16
+@wom = global %struct.wombat zeroinitializer, align 4, !dbg !25
@llvm.global_ctors = appending global [1 x { i32, void ()* }] [{ i32, void ()* } { i32 65535, void ()* @_GLOBAL__I_a }]
; Function Attrs: nounwind uwtable
-define void @_Z3foov() #0 !dbg !22 {
+define void @_Z3foov() #0 !dbg !40 {
entry:
%b = alloca %struct.baz, align 1
- call void @llvm.dbg.declare(metadata %struct.baz* %b, metadata !46, metadata !DIExpression()), !dbg !48
- ret void, !dbg !49
+ call void @llvm.dbg.declare(metadata %struct.baz* %b, metadata !43, metadata !45), !dbg !46
+ ret void, !dbg !47
}
; Function Attrs: nounwind readnone
declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
-define internal void @__cxx_global_var_init() section ".text.startup" !dbg !26 {
+define internal void @__cxx_global_var_init() section ".text.startup" !dbg !48 {
entry:
- call void @_ZN12_GLOBAL__N_16walrusC2Ev(%"struct.<anonymous namespace>::walrus"* @w), !dbg !50
- ret void, !dbg !50
+ call void @_ZN12_GLOBAL__N_16walrusC2Ev(%"struct.<anonymous namespace>::walrus"* @w), !dbg !49
+ ret void, !dbg !49
}
; Function Attrs: nounwind uwtable
-define internal void @_ZN12_GLOBAL__N_16walrusC2Ev(%"struct.<anonymous namespace>::walrus"* %this) unnamed_addr #0 align 2 !dbg !27 {
+define internal void @_ZN12_GLOBAL__N_16walrusC2Ev(%"struct.<anonymous namespace>::walrus"* %this) unnamed_addr #0 align 2 !dbg !50 {
entry:
%this.addr = alloca %"struct.<anonymous namespace>::walrus"*, align 8
store %"struct.<anonymous namespace>::walrus"* %this, %"struct.<anonymous namespace>::walrus"** %this.addr, align 8
- call void @llvm.dbg.declare(metadata %"struct.<anonymous namespace>::walrus"** %this.addr, metadata !51, metadata !DIExpression()), !dbg !53
+ call void @llvm.dbg.declare(metadata %"struct.<anonymous namespace>::walrus"** %this.addr, metadata !51, metadata !45), !dbg !53
%this1 = load %"struct.<anonymous namespace>::walrus"*, %"struct.<anonymous namespace>::walrus"** %this.addr
ret void, !dbg !54
}
-define internal void @_GLOBAL__I_a() section ".text.startup" !dbg !36 {
+define internal void @_GLOBAL__I_a() section ".text.startup" !dbg !55 {
entry:
- call void @__cxx_global_var_init(), !dbg !55
- ret void, !dbg !55
+ call void @__cxx_global_var_init(), !dbg !57
+ ret void, !dbg !57
}
attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #1 = { nounwind readnone }
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!43, !44}
-!llvm.ident = !{!45}
-
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, splitDebugFilename: "bar.dwo", emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !38, imports: !2)
-!1 = !DIFile(filename: "bar.cpp", directory: "/tmp/dbginfo")
-!2 = !{}
-!3 = !{!4, !6, !14, !17}
-!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "bar", line: 1, size: 8, align: 8, file: !5, elements: !2, identifier: "_ZTS3bar")
-!5 = !DIFile(filename: "bar.h", directory: "/tmp/dbginfo")
-!6 = !DICompositeType(tag: DW_TAG_class_type, name: "fluffy", line: 13, size: 64, align: 32, file: !1, scope: !7, elements: !10, identifier: "_ZTSN7echidna8capybara8mongoose6fluffyE")
-!7 = !DINamespace(name: "mongoose", line: 12, file: !1, scope: !8)
-!8 = !DINamespace(name: "capybara", line: 11, file: !1, scope: !9)
-!9 = !DINamespace(name: "echidna", line: 10, file: !1, scope: null)
-!10 = !{!11, !13}
-!11 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 14, size: 32, align: 32, flags: DIFlagPrivate, file: !1, scope: !6, baseType: !12)
-!12 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!13 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 15, size: 32, align: 32, offset: 32, flags: DIFlagPrivate, file: !1, scope: !6, baseType: !12)
-!14 = !DICompositeType(tag: DW_TAG_structure_type, name: "wombat", line: 31, size: 64, align: 32, file: !1, elements: !15, identifier: "_ZTS6wombat")
-!15 = !{!16}
-!16 = !DIDerivedType(tag: DW_TAG_member, name: "a_b", line: 35, size: 64, align: 32, file: !1, scope: !14, baseType: !17)
-!17 = !DICompositeType(tag: DW_TAG_structure_type, line: 32, size: 64, align: 32, file: !1, scope: !14, elements: !18, identifier: "_ZTSN6wombatUt_E")
-!18 = !{!19, !20}
-!19 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 33, size: 32, align: 32, file: !1, scope: !17, baseType: !12)
-!20 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 34, size: 32, align: 32, offset: 32, file: !1, scope: !17, baseType: !12)
-!22 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !1, scope: !23, type: !24, variables: !2)
-!23 = !DIFile(filename: "bar.cpp", directory: "/tmp/dbginfo")
-!24 = !DISubroutineType(types: !25)
-!25 = !{null}
-!26 = distinct !DISubprogram(name: "__cxx_global_var_init", line: 29, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 29, file: !1, scope: !23, type: !24, variables: !2)
-!27 = distinct !DISubprogram(name: "walrus", linkageName: "_ZN12_GLOBAL__N_16walrusC2Ev", line: 25, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 25, file: !1, scope: !28, type: !32, declaration: !31, variables: !2)
-!28 = !DICompositeType(tag: DW_TAG_structure_type, name: "walrus", line: 24, size: 8, align: 8, file: !1, scope: !29, elements: !30)
-!29 = !DINamespace(line: 23, file: !1, scope: null)
-!30 = !{!31}
-!31 = !DISubprogram(name: "walrus", line: 25, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 25, file: !1, scope: !28, type: !32)
-!32 = !DISubroutineType(types: !33)
-!33 = !{null, !34}
-!34 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !28)
-!36 = distinct !DISubprogram(name: "", linkageName: "_GLOBAL__I_a", line: 25, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagArtificial, isOptimized: false, unit: !0, scopeLine: 25, file: !1, scope: !23, type: !37, variables: !2)
-!37 = !DISubroutineType(types: !2)
-!38 = !{!39, !40, !41, !42}
-!39 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "b", line: 3, isLocal: false, isDefinition: true, scope: null, file: !23, type: !4))
-!40 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "animal", linkageName: "_ZN7echidna8capybara8mongoose6animalE", line: 18, isLocal: false, isDefinition: true, scope: !7, file: !23, type: !6))
-!41 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "w", line: 29, isLocal: true, isDefinition: true, scope: null, file: !23, type: !28))
-!42 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "wom", line: 38, isLocal: false, isDefinition: true, scope: null, file: !23, type: !14))
-!43 = !{i32 2, !"Dwarf Version", i32 4}
-!44 = !{i32 1, !"Debug Info Version", i32 3}
-!45 = !{!"clang version 3.5 "}
-!46 = !DILocalVariable(name: "b", line: 7, scope: !22, file: !23, type: !47)
-!47 = !DICompositeType(tag: DW_TAG_structure_type, name: "baz", line: 6, size: 8, align: 8, file: !1, scope: !22, elements: !2)
-!48 = !DILocation(line: 7, scope: !22)
-!49 = !DILocation(line: 8, scope: !22)
-!50 = !DILocation(line: 29, scope: !26)
-!51 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !27, type: !52)
-!52 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !28)
-!53 = !DILocation(line: 0, scope: !27)
-!54 = !DILocation(line: 25, scope: !27)
-!55 = !DILocation(line: 25, scope: !36)
+!llvm.dbg.cu = !{!34}
+!llvm.module.flags = !{!37, !38}
+!llvm.ident = !{!39}
+
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "b", scope: null, file: !2, line: 3, type: !3, isLocal: false, isDefinition: true)
+!2 = !DIFile(filename: "bar.cpp", directory: "/tmp/dbginfo")
+!3 = !DICompositeType(tag: DW_TAG_structure_type, name: "bar", file: !4, line: 1, size: 8, align: 8, elements: !5, identifier: "_ZTS3bar")
+!4 = !DIFile(filename: "bar.h", directory: "/tmp/dbginfo")
+!5 = !{}
+!6 = !DIGlobalVariableExpression(var: !7)
+!7 = !DIGlobalVariable(name: "animal", linkageName: "_ZN7echidna8capybara8mongoose6animalE", scope: !8, file: !2, line: 18, type: !11, isLocal: false, isDefinition: true)
+!8 = !DINamespace(name: "mongoose", scope: !9, file: !2, line: 12)
+!9 = !DINamespace(name: "capybara", scope: !10, file: !2, line: 11)
+!10 = !DINamespace(name: "echidna", scope: null, file: !2, line: 10)
+!11 = !DICompositeType(tag: DW_TAG_class_type, name: "fluffy", scope: !8, file: !2, line: 13, size: 64, align: 32, elements: !12, identifier: "_ZTSN7echidna8capybara8mongoose6fluffyE")
+!12 = !{!13, !15}
+!13 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !11, file: !2, line: 14, baseType: !14, size: 32, align: 32, flags: DIFlagPrivate)
+!14 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!15 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !11, file: !2, line: 15, baseType: !14, size: 32, align: 32, offset: 32, flags: DIFlagPrivate)
+!16 = !DIGlobalVariableExpression(var: !17)
+!17 = !DIGlobalVariable(name: "w", scope: null, file: !2, line: 29, type: !18, isLocal: true, isDefinition: true)
+!18 = !DICompositeType(tag: DW_TAG_structure_type, name: "walrus", scope: !19, file: !2, line: 24, size: 8, align: 8, elements: !20)
+!19 = !DINamespace(scope: null, file: !2, line: 23)
+!20 = !{!21}
+!21 = !DISubprogram(name: "walrus", scope: !18, file: !2, line: 25, type: !22, isLocal: false, isDefinition: false, scopeLine: 25, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false)
+!22 = !DISubroutineType(types: !23)
+!23 = !{null, !24}
+!24 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !18, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
+!25 = !DIGlobalVariableExpression(var: !26)
+!26 = !DIGlobalVariable(name: "wom", scope: null, file: !2, line: 38, type: !27, isLocal: false, isDefinition: true)
+!27 = !DICompositeType(tag: DW_TAG_structure_type, name: "wombat", file: !2, line: 31, size: 64, align: 32, elements: !28, identifier: "_ZTS6wombat")
+!28 = !{!29}
+!29 = !DIDerivedType(tag: DW_TAG_member, name: "a_b", scope: !27, file: !2, line: 35, baseType: !30, size: 64, align: 32)
+!30 = !DICompositeType(tag: DW_TAG_structure_type, scope: !27, file: !2, line: 32, size: 64, align: 32, elements: !31, identifier: "_ZTSN6wombatUt_E")
+!31 = !{!32, !33}
+!32 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !30, file: !2, line: 33, baseType: !14, size: 32, align: 32)
+!33 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !30, file: !2, line: 34, baseType: !14, size: 32, align: 32, offset: 32)
+!34 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 3.5 ", isOptimized: false, runtimeVersion: 0, splitDebugFilename: "bar.dwo", emissionKind: FullDebug, enums: !5, retainedTypes: !35, globals: !36, imports: !5)
+!35 = !{!3, !11, !27, !30}
+!36 = !{!0, !6, !16, !25}
+!37 = !{i32 2, !"Dwarf Version", i32 4}
+!38 = !{i32 1, !"Debug Info Version", i32 3}
+!39 = !{!"clang version 3.5 "}
+!40 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", scope: !2, file: !2, line: 5, type: !41, isLocal: false, isDefinition: true, scopeLine: 5, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !34, variables: !5)
+!41 = !DISubroutineType(types: !42)
+!42 = !{null}
+!43 = !DILocalVariable(name: "b", scope: !40, file: !2, line: 7, type: !44)
+!44 = !DICompositeType(tag: DW_TAG_structure_type, name: "baz", scope: !40, file: !2, line: 6, size: 8, align: 8, elements: !5)
+!45 = !DIExpression()
+!46 = !DILocation(line: 7, scope: !40)
+!47 = !DILocation(line: 8, scope: !40)
+!48 = distinct !DISubprogram(name: "__cxx_global_var_init", scope: !2, file: !2, line: 29, type: !41, isLocal: true, isDefinition: true, scopeLine: 29, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !34, variables: !5)
+!49 = !DILocation(line: 29, scope: !48)
+!50 = distinct !DISubprogram(name: "walrus", linkageName: "_ZN12_GLOBAL__N_16walrusC2Ev", scope: !18, file: !2, line: 25, type: !22, isLocal: true, isDefinition: true, scopeLine: 25, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !34, declaration: !21, variables: !5)
+!51 = !DILocalVariable(name: "this", arg: 1, scope: !50, type: !52, flags: DIFlagArtificial | DIFlagObjectPointer)
+!52 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !18, size: 64, align: 64)
+!53 = !DILocation(line: 0, scope: !50)
+!54 = !DILocation(line: 25, scope: !50)
+!55 = distinct !DISubprogram(linkageName: "_GLOBAL__I_a", scope: !2, file: !2, line: 25, type: !56, isLocal: true, isDefinition: true, scopeLine: 25, virtualIndex: 6, flags: DIFlagArtificial, isOptimized: false, unit: !34, variables: !5)
+!56 = !DISubroutineType(types: !5)
+!57 = !DILocation(line: 25, scope: !55)
+
OpenPOWER on IntegriCloud