Frederic Riss | 0e9a50f | 2015-03-10 00:46:31 +0000 | [diff] [blame] | 1 | ; 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 |
| 30 | ; CHECK: Name: {{[0-9a-f]*}} "is" |
| 31 | ; CHECK: Name: {{[0-9a-f]*}} "k1" |
| 32 | |
| 33 | ; CHECK: Hash = 0xa4b42a1e |
| 34 | ; CHECK: Name: {{[0-9a-f]*}} "_ZN5clang23DataRecursiveASTVisitorIN12_GLOBAL__N_124UnusedBackingIvarCheckerEE26TraverseCUDAKernelCallExprEPNS_18CUDAKernelCallExprE" |
| 35 | ; CHECK: Name: {{[0-9a-f]*}} "_ZN4llvm16DenseMapIteratorIPNS_10MDLocationENS_6detail13DenseSetEmptyENS_10MDNodeInfoIS1_EENS3_12DenseSetPairIS2_EELb0EE23AdvancePastEmptyBucketsEv" |
| 36 | |
| 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 | |
| 53 | |
| 54 | |
| 55 | @ForceTopDown = common global i32 0, align 4 |
| 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 |
| 57 | @_ZN5clang23DataRecursiveASTVisitorIN12_GLOBAL__N_124UnusedBackingIvarCheckerEE26TraverseCUDAKernelCallExprEPNS_18CUDAKernelCallExprE = common global i32 0, align 4 |
| 58 | @_ZN4llvm16DenseMapIteratorIPNS_10MDLocationENS_6detail13DenseSetEmptyENS_10MDNodeInfoIS1_EENS3_12DenseSetPairIS2_EELb0EE23AdvancePastEmptyBucketsEv = common global i32 0, align 4 |
| 59 | @_ZNK4llvm12LivePhysRegs5printERNS_11raw_ostreamE = common global i32 0, align 4 |
| 60 | @_ZN4llvm15ScalarEvolution14getSignedRangeEPKNS_4SCEVE = common global i32 0, align 4 |
| 61 | @k1 = common global i32 0, align 4 |
| 62 | @is = common global i32 0, align 4 |
| 63 | @setStmt = common global i32 0, align 4 |
| 64 | @_ZN4llvm5TwineC1Ei = common global i32 0, align 4 |
| 65 | @_ZNK5clang12OverrideAttr5cloneERNS_10ASTContextE = common global i32 0, align 4 |
| 66 | @_ZN4llvm22MachineModuleInfoMachOD2Ev = common global i32 0, align 4 |
| 67 | |
| 68 | !llvm.dbg.cu = !{!0} |
| 69 | !llvm.module.flags = !{!17, !18, !19} |
| 70 | !llvm.ident = !{!20} |
| 71 | |
Duncan P. N. Exon Smith | 55ca964 | 2015-08-03 17:26:41 +0000 | [diff] [blame] | 72 | !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: 1, enums: !2, retainedTypes: !2, subprograms: !2, globals: !3, imports: !2) |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 73 | !1 = !DIFile(filename: "hash-collisions.c", directory: "/tmp") |
Frederic Riss | 0e9a50f | 2015-03-10 00:46:31 +0000 | [diff] [blame] | 74 | !2 = !{} |
| 75 | !3 = !{!4, !6, !7, !8, !9, !10, !11, !12, !13, !14, !15, !16} |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 76 | !4 = !DIGlobalVariable(name: "ForceTopDown", scope: !0, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, variable: i32* @ForceTopDown) |
| 77 | !5 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) |
| 78 | !6 = !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, variable: i32* @_ZNSt3__116allocator_traitsINS_9allocatorINS_11__tree_nodeINS_12__value_typeIPN4llvm10BasicBlockEPNS4_10RegionNodeEEEPvEEEEE11__constructIS9_JNS_4pairIS6_S8_EEEEEvNS_17integral_constantIbLb1EEERSC_PT_DpOT0_) |
| 79 | !7 = !DIGlobalVariable(name: "_ZN5clang23DataRecursiveASTVisitorIN12_GLOBAL__N_124UnusedBackingIvarCheckerEE26TraverseCUDAKernelCallExprEPNS_18CUDAKernelCallExprE", scope: !0, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, variable: i32* @_ZN5clang23DataRecursiveASTVisitorIN12_GLOBAL__N_124UnusedBackingIvarCheckerEE26TraverseCUDAKernelCallExprEPNS_18CUDAKernelCallExprE) |
| 80 | !8 = !DIGlobalVariable(name: "_ZN4llvm16DenseMapIteratorIPNS_10MDLocationENS_6detail13DenseSetEmptyENS_10MDNodeInfoIS1_EENS3_12DenseSetPairIS2_EELb0EE23AdvancePastEmptyBucketsEv", scope: !0, file: !1, line: 4, type: !5, isLocal: false, isDefinition: true, variable: i32* @_ZN4llvm16DenseMapIteratorIPNS_10MDLocationENS_6detail13DenseSetEmptyENS_10MDNodeInfoIS1_EENS3_12DenseSetPairIS2_EELb0EE23AdvancePastEmptyBucketsEv) |
| 81 | !9 = !DIGlobalVariable(name: "_ZNK4llvm12LivePhysRegs5printERNS_11raw_ostreamE", scope: !0, file: !1, line: 5, type: !5, isLocal: false, isDefinition: true, variable: i32* @_ZNK4llvm12LivePhysRegs5printERNS_11raw_ostreamE) |
| 82 | !10 = !DIGlobalVariable(name: "_ZN4llvm15ScalarEvolution14getSignedRangeEPKNS_4SCEVE", scope: !0, file: !1, line: 6, type: !5, isLocal: false, isDefinition: true, variable: i32* @_ZN4llvm15ScalarEvolution14getSignedRangeEPKNS_4SCEVE) |
| 83 | !11 = !DIGlobalVariable(name: "k1", scope: !0, file: !1, line: 7, type: !5, isLocal: false, isDefinition: true, variable: i32* @k1) |
| 84 | !12 = !DIGlobalVariable(name: "is", scope: !0, file: !1, line: 8, type: !5, isLocal: false, isDefinition: true, variable: i32* @is) |
| 85 | !13 = !DIGlobalVariable(name: "setStmt", scope: !0, file: !1, line: 9, type: !5, isLocal: false, isDefinition: true, variable: i32* @setStmt) |
| 86 | !14 = !DIGlobalVariable(name: "_ZN4llvm5TwineC1Ei", scope: !0, file: !1, line: 10, type: !5, isLocal: false, isDefinition: true, variable: i32* @_ZN4llvm5TwineC1Ei) |
| 87 | !15 = !DIGlobalVariable(name: "_ZNK5clang12OverrideAttr5cloneERNS_10ASTContextE", scope: !0, file: !1, line: 11, type: !5, isLocal: false, isDefinition: true, variable: i32* @_ZNK5clang12OverrideAttr5cloneERNS_10ASTContextE) |
| 88 | !16 = !DIGlobalVariable(name: "_ZN4llvm22MachineModuleInfoMachOD2Ev", scope: !0, file: !1, line: 12, type: !5, isLocal: false, isDefinition: true, variable: i32* @_ZN4llvm22MachineModuleInfoMachOD2Ev) |
Frederic Riss | 0e9a50f | 2015-03-10 00:46:31 +0000 | [diff] [blame] | 89 | !17 = !{i32 2, !"Dwarf Version", i32 2} |
| 90 | !18 = !{i32 2, !"Debug Info Version", i32 3} |
| 91 | !19 = !{i32 1, !"PIC Level", i32 2} |
| 92 | !20 = !{!"clang version 3.7.0 (trunk 231548) (llvm/trunk 231547)"} |