blob: ff2e3425e7c29337ade32a4592ada24b264b781b [file] [log] [blame]
Frederic Riss0e9a50f2015-03-10 00:46:31 +00001; REQUIRES: object-emission
2; RUN: %llc_dwarf -dwarf-accel-tables=Enable -filetype=obj -o - < %s | llvm-dwarfdump -debug-dump=apple_names - | FileCheck %s
3
4; Generated from the following C code using
5; clang -S -emit-llvm hash-collision.c
6;
7; The names of the variables have been chosen so that they produce hash collisions.
8; There are 12 names here that are hashed to only 6 hashes (each pair of lines
9; hashes to the same value, see the CHECK lines below).
10;
11; int ForceTopDown;
12; int _ZNSt3__116allocator_traitsINS_9allocatorINS_11__tree_nodeINS_12__value_typeIPN4llvm10BasicBlockEPNS4_10RegionNodeEEEPvEEEEE11__constructIS9_JNS_4pairIS6_S8_EEEEEvNS_17integral_constantIbLb1EEERSC_PT_DpOT0_;
13; int _ZN5clang23DataRecursiveASTVisitorIN12_GLOBAL__N_124UnusedBackingIvarCheckerEE26TraverseCUDAKernelCallExprEPNS_18CUDAKernelCallExprE;
14; int _ZN4llvm16DenseMapIteratorIPNS_10MDLocationENS_6detail13DenseSetEmptyENS_10MDNodeInfoIS1_EENS3_12DenseSetPairIS2_EELb0EE23AdvancePastEmptyBucketsEv;
15; int _ZNK4llvm12LivePhysRegs5printERNS_11raw_ostreamE;
16; int _ZN4llvm15ScalarEvolution14getSignedRangeEPKNS_4SCEVE;
17; int k1;
18; int is;
19; int setStmt;
20; int _ZN4llvm5TwineC1Ei;
21; int _ZNK5clang12OverrideAttr5cloneERNS_10ASTContextE;
22; int _ZN4llvm22MachineModuleInfoMachOD2Ev;
23
24; Check that we have the right amount of hashes.
25; CHECK: Bucket count = 6
26; CHECK: Hashes count = 6
27
28; Check that all the names are present in the output
29; CHECK: Hash = 0x00597841
Frederic Riss0e9a50f2015-03-10 00:46:31 +000030; CHECK: Name: {{[0-9a-f]*}} "k1"
Rui Ueyama87b30ac2017-04-26 22:45:04 +000031; CHECK: Name: {{[0-9a-f]*}} "is"
Frederic Riss0e9a50f2015-03-10 00:46:31 +000032
33; CHECK: Hash = 0xa4b42a1e
Frederic Riss0e9a50f2015-03-10 00:46:31 +000034; CHECK: Name: {{[0-9a-f]*}} "_ZN4llvm16DenseMapIteratorIPNS_10MDLocationENS_6detail13DenseSetEmptyENS_10MDNodeInfoIS1_EENS3_12DenseSetPairIS2_EELb0EE23AdvancePastEmptyBucketsEv"
Rui Ueyama87b30ac2017-04-26 22:45:04 +000035; CHECK: Name: {{[0-9a-f]*}} "_ZN5clang23DataRecursiveASTVisitorIN12_GLOBAL__N_124UnusedBackingIvarCheckerEE26TraverseCUDAKernelCallExprEPNS_18CUDAKernelCallExprE"
Frederic Riss0e9a50f2015-03-10 00:46:31 +000036
37; CHECK: Hash = 0xeee7c0b2
38; CHECK: Name: {{[0-9a-f]*}} "_ZNK4llvm12LivePhysRegs5printERNS_11raw_ostreamE"
39; CHECK: Name: {{[0-9a-f]*}} "_ZN4llvm15ScalarEvolution14getSignedRangeEPKNS_4SCEVE"
40
41; CHECK: Hash = 0xea48ac5f
42; CHECK: Name: {{[0-9a-f]*}} "ForceTopDown"
43; CHECK: Name: {{[0-9a-f]*}} "_ZNSt3__116allocator_traitsINS_9allocatorINS_11__tree_nodeINS_12__value_typeIPN4llvm10BasicBlockEPNS4_10RegionNodeEEEPvEEEEE11__constructIS9_JNS_4pairIS6_S8_EEEEEvNS_17integral_constantIbLb1EEERSC_PT_DpOT0_"
44
45; CHECK: Hash = 0x6b22f71f
46; CHECK: Name: {{[0-9a-f]*}} "_ZNK5clang12OverrideAttr5cloneERNS_10ASTContextE"
47; CHECK: Name: {{[0-9a-f]*}} "_ZN4llvm22MachineModuleInfoMachOD2Ev"
48
49; CHECK: Hash = 0x8c248979
50; CHECK: Name: {{[0-9a-f]*}} "setStmt"
51; CHECK: Name: {{[0-9a-f]*}} "_ZN4llvm5TwineC1Ei"
52
Adrian Prantl1eadba12016-12-22 00:45:21 +000053source_filename = "test/DebugInfo/Generic/accel-table-hash-collisions.ll"
Frederic Riss0e9a50f2015-03-10 00:46:31 +000054
Adrian Prantl1eadba12016-12-22 00:45:21 +000055@ForceTopDown = common global i32 0, align 4, !dbg !0
Peter Collingbourned4135bb2016-09-13 01:12:59 +000056@_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
Adrian Prantl1eadba12016-12-22 00:45:21 +000057@_ZN5clang23DataRecursiveASTVisitorIN12_GLOBAL__N_124UnusedBackingIvarCheckerEE26TraverseCUDAKernelCallExprEPNS_18CUDAKernelCallExprE = common global i32 0, align 4, !dbg !9
58@_ZN4llvm16DenseMapIteratorIPNS_10MDLocationENS_6detail13DenseSetEmptyENS_10MDNodeInfoIS1_EENS3_12DenseSetPairIS2_EELb0EE23AdvancePastEmptyBucketsEv = common global i32 0, align 4, !dbg !11
59@_ZNK4llvm12LivePhysRegs5printERNS_11raw_ostreamE = common global i32 0, align 4, !dbg !13
60@_ZN4llvm15ScalarEvolution14getSignedRangeEPKNS_4SCEVE = common global i32 0, align 4, !dbg !15
61@k1 = common global i32 0, align 4, !dbg !17
62@is = common global i32 0, align 4, !dbg !19
63@setStmt = common global i32 0, align 4, !dbg !21
64@_ZN4llvm5TwineC1Ei = common global i32 0, align 4, !dbg !23
65@_ZNK5clang12OverrideAttr5cloneERNS_10ASTContextE = common global i32 0, align 4, !dbg !25
66@_ZN4llvm22MachineModuleInfoMachOD2Ev = common global i32 0, align 4, !dbg !27
Frederic Riss0e9a50f2015-03-10 00:46:31 +000067
Adrian Prantl1eadba12016-12-22 00:45:21 +000068!llvm.dbg.cu = !{!2}
69!llvm.module.flags = !{!29, !30, !31}
70!llvm.ident = !{!32}
Frederic Riss0e9a50f2015-03-10 00:46:31 +000071
Adrian Prantl1eadba12016-12-22 00:45:21 +000072!0 = !DIGlobalVariableExpression(var: !1)
73!1 = !DIGlobalVariable(name: "ForceTopDown", scope: !2, file: !3, line: 1, type: !8, isLocal: false, isDefinition: true)
74!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)
75!3 = !DIFile(filename: "hash-collisions.c", directory: "/tmp")
76!4 = !{}
77!5 = !{!0, !6, !9, !11, !13, !15, !17, !19, !21, !23, !25, !27}
78!6 = !DIGlobalVariableExpression(var: !7)
79!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)
80!8 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
81!9 = !DIGlobalVariableExpression(var: !10)
82!10 = !DIGlobalVariable(name: "_ZN5clang23DataRecursiveASTVisitorIN12_GLOBAL__N_124UnusedBackingIvarCheckerEE26TraverseCUDAKernelCallExprEPNS_18CUDAKernelCallExprE", scope: !2, file: !3, line: 3, type: !8, isLocal: false, isDefinition: true)
83!11 = !DIGlobalVariableExpression(var: !12)
84!12 = !DIGlobalVariable(name: "_ZN4llvm16DenseMapIteratorIPNS_10MDLocationENS_6detail13DenseSetEmptyENS_10MDNodeInfoIS1_EENS3_12DenseSetPairIS2_EELb0EE23AdvancePastEmptyBucketsEv", scope: !2, file: !3, line: 4, type: !8, isLocal: false, isDefinition: true)
85!13 = !DIGlobalVariableExpression(var: !14)
86!14 = !DIGlobalVariable(name: "_ZNK4llvm12LivePhysRegs5printERNS_11raw_ostreamE", scope: !2, file: !3, line: 5, type: !8, isLocal: false, isDefinition: true)
87!15 = !DIGlobalVariableExpression(var: !16)
88!16 = !DIGlobalVariable(name: "_ZN4llvm15ScalarEvolution14getSignedRangeEPKNS_4SCEVE", scope: !2, file: !3, line: 6, type: !8, isLocal: false, isDefinition: true)
89!17 = !DIGlobalVariableExpression(var: !18)
90!18 = !DIGlobalVariable(name: "k1", scope: !2, file: !3, line: 7, type: !8, isLocal: false, isDefinition: true)
91!19 = !DIGlobalVariableExpression(var: !20)
92!20 = !DIGlobalVariable(name: "is", scope: !2, file: !3, line: 8, type: !8, isLocal: false, isDefinition: true)
93!21 = !DIGlobalVariableExpression(var: !22)
94!22 = !DIGlobalVariable(name: "setStmt", scope: !2, file: !3, line: 9, type: !8, isLocal: false, isDefinition: true)
95!23 = !DIGlobalVariableExpression(var: !24)
96!24 = !DIGlobalVariable(name: "_ZN4llvm5TwineC1Ei", scope: !2, file: !3, line: 10, type: !8, isLocal: false, isDefinition: true)
97!25 = !DIGlobalVariableExpression(var: !26)
98!26 = !DIGlobalVariable(name: "_ZNK5clang12OverrideAttr5cloneERNS_10ASTContextE", scope: !2, file: !3, line: 11, type: !8, isLocal: false, isDefinition: true)
99!27 = !DIGlobalVariableExpression(var: !28)
100!28 = !DIGlobalVariable(name: "_ZN4llvm22MachineModuleInfoMachOD2Ev", scope: !2, file: !3, line: 12, type: !8, isLocal: false, isDefinition: true)
101!29 = !{i32 2, !"Dwarf Version", i32 2}
102!30 = !{i32 2, !"Debug Info Version", i32 3}
103!31 = !{i32 1, !"PIC Level", i32 2}
104!32 = !{!"clang version 3.7.0 (trunk 231548) (llvm/trunk 231547)"}
105