• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: %llc_dwarf -accel-tables=Apple -filetype=obj -o - < %s \
2; RUN:   | llvm-dwarfdump -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 0x597841
30; CHECK:    String: 0x{{[0-9a-f]*}} "is"
31; CHECK:    String: 0x{{[0-9a-f]*}} "k1"
32
33; CHECK: Hash 0xa4b42a1e
34; CHECK:    String: 0x{{[0-9a-f]*}} "_ZN5clang23DataRecursiveASTVisitorIN12_GLOBAL__N_124UnusedBackingIvarCheckerEE26TraverseCUDAKernelCallExprEPNS_18CUDAKernelCallExprE"
35; CHECK:    String: 0x{{[0-9a-f]*}} "_ZN4llvm16DenseMapIteratorIPNS_10MDLocationENS_6detail13DenseSetEmptyENS_10MDNodeInfoIS1_EENS3_12DenseSetPairIS2_EELb0EE23AdvancePastEmptyBucketsEv"
36
37; CHECK: Hash 0xeee7c0b2
38; CHECK:    String: 0x{{[0-9a-f]*}} "_ZNK4llvm12LivePhysRegs5printERNS_11raw_ostreamE"
39; CHECK:    String: 0x{{[0-9a-f]*}} "_ZN4llvm15ScalarEvolution14getSignedRangeEPKNS_4SCEVE"
40
41; CHECK: Hash 0xea48ac5f
42; CHECK:    String: 0x{{[0-9a-f]*}} "ForceTopDown"
43; CHECK:    String: 0x{{[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:    String: 0x{{[0-9a-f]*}} "_ZNK5clang12OverrideAttr5cloneERNS_10ASTContextE"
47; CHECK:    String: 0x{{[0-9a-f]*}} "_ZN4llvm22MachineModuleInfoMachOD2Ev"
48
49; CHECK:  Hash 0x8c248979
50; CHECK:    String: 0x{{[0-9a-f]*}} "setStmt"
51; CHECK:    String: 0x{{[0-9a-f]*}} "_ZN4llvm5TwineC1Ei"
52
53source_filename = "test/DebugInfo/Generic/accel-table-hash-collisions.ll"
54
55@ForceTopDown = common global i32 0, align 4, !dbg !0
56@_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
57@_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
67
68!llvm.dbg.cu = !{!2}
69!llvm.module.flags = !{!29, !30, !31}
70!llvm.ident = !{!32}
71
72!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
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, expr: !DIExpression())
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, expr: !DIExpression())
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, expr: !DIExpression())
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, expr: !DIExpression())
86!14 = !DIGlobalVariable(name: "_ZNK4llvm12LivePhysRegs5printERNS_11raw_ostreamE", scope: !2, file: !3, line: 5, type: !8, isLocal: false, isDefinition: true)
87!15 = !DIGlobalVariableExpression(var: !16, expr: !DIExpression())
88!16 = !DIGlobalVariable(name: "_ZN4llvm15ScalarEvolution14getSignedRangeEPKNS_4SCEVE", scope: !2, file: !3, line: 6, type: !8, isLocal: false, isDefinition: true)
89!17 = !DIGlobalVariableExpression(var: !18, expr: !DIExpression())
90!18 = !DIGlobalVariable(name: "k1", scope: !2, file: !3, line: 7, type: !8, isLocal: false, isDefinition: true)
91!19 = !DIGlobalVariableExpression(var: !20, expr: !DIExpression())
92!20 = !DIGlobalVariable(name: "is", scope: !2, file: !3, line: 8, type: !8, isLocal: false, isDefinition: true)
93!21 = !DIGlobalVariableExpression(var: !22, expr: !DIExpression())
94!22 = !DIGlobalVariable(name: "setStmt", scope: !2, file: !3, line: 9, type: !8, isLocal: false, isDefinition: true)
95!23 = !DIGlobalVariableExpression(var: !24, expr: !DIExpression())
96!24 = !DIGlobalVariable(name: "_ZN4llvm5TwineC1Ei", scope: !2, file: !3, line: 10, type: !8, isLocal: false, isDefinition: true)
97!25 = !DIGlobalVariableExpression(var: !26, expr: !DIExpression())
98!26 = !DIGlobalVariable(name: "_ZNK5clang12OverrideAttr5cloneERNS_10ASTContextE", scope: !2, file: !3, line: 11, type: !8, isLocal: false, isDefinition: true)
99!27 = !DIGlobalVariableExpression(var: !28, expr: !DIExpression())
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
106