Home | History | Annotate | Download | only in Generic
      1 ; REQUIRES: object-emission
      2 ; RUN: %llc_dwarf -accel-tables=Apple -filetype=obj -o - < %s \
      3 ; RUN:   | llvm-dwarfdump -apple-names - | FileCheck %s
      4 
      5 ; Generated from the following C code using
      6 ; clang -S -emit-llvm hash-collision.c
      7 ;
      8 ; The names of the variables have been chosen so that they produce hash collisions.
      9 ; There are 12 names here that are hashed to only 6 hashes (each pair of lines
     10 ; hashes to the same value, see the CHECK lines below).
     11 ;
     12 ; int ForceTopDown;
     13 ; int _ZNSt3__116allocator_traitsINS_9allocatorINS_11__tree_nodeINS_12__value_typeIPN4llvm10BasicBlockEPNS4_10RegionNodeEEEPvEEEEE11__constructIS9_JNS_4pairIS6_S8_EEEEEvNS_17integral_constantIbLb1EEERSC_PT_DpOT0_;
     14 ; int _ZN5clang23DataRecursiveASTVisitorIN12_GLOBAL__N_124UnusedBackingIvarCheckerEE26TraverseCUDAKernelCallExprEPNS_18CUDAKernelCallExprE; 
     15 ; int _ZN4llvm16DenseMapIteratorIPNS_10MDLocationENS_6detail13DenseSetEmptyENS_10MDNodeInfoIS1_EENS3_12DenseSetPairIS2_EELb0EE23AdvancePastEmptyBucketsEv;
     16 ; int _ZNK4llvm12LivePhysRegs5printERNS_11raw_ostreamE;
     17 ; int _ZN4llvm15ScalarEvolution14getSignedRangeEPKNS_4SCEVE;
     18 ; int k1;
     19 ; int is;
     20 ; int setStmt;
     21 ; int _ZN4llvm5TwineC1Ei;
     22 ; int _ZNK5clang12OverrideAttr5cloneERNS_10ASTContextE;
     23 ; int _ZN4llvm22MachineModuleInfoMachOD2Ev;
     24 
     25 ; Check that we have the right amount of hashes.
     26 ; CHECK: Bucket count: 6
     27 ; CHECK: Hashes count: 6
     28 
     29 ; Check that all the names are present in the output
     30 ; CHECK:  Hash 0x597841
     31 ; CHECK:    String: 0x{{[0-9a-f]*}} "is"
     32 ; CHECK:    String: 0x{{[0-9a-f]*}} "k1"
     33 
     34 ; CHECK: Hash 0xa4b42a1e
     35 ; CHECK:    String: 0x{{[0-9a-f]*}} "_ZN5clang23DataRecursiveASTVisitorIN12_GLOBAL__N_124UnusedBackingIvarCheckerEE26TraverseCUDAKernelCallExprEPNS_18CUDAKernelCallExprE"
     36 ; CHECK:    String: 0x{{[0-9a-f]*}} "_ZN4llvm16DenseMapIteratorIPNS_10MDLocationENS_6detail13DenseSetEmptyENS_10MDNodeInfoIS1_EENS3_12DenseSetPairIS2_EELb0EE23AdvancePastEmptyBucketsEv"
     37 
     38 ; CHECK: Hash 0xeee7c0b2
     39 ; CHECK:    String: 0x{{[0-9a-f]*}} "_ZNK4llvm12LivePhysRegs5printERNS_11raw_ostreamE"
     40 ; CHECK:    String: 0x{{[0-9a-f]*}} "_ZN4llvm15ScalarEvolution14getSignedRangeEPKNS_4SCEVE"
     41 
     42 ; CHECK: Hash 0xea48ac5f
     43 ; CHECK:    String: 0x{{[0-9a-f]*}} "ForceTopDown"
     44 ; 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_"
     45 
     46 ; CHECK:  Hash 0x6b22f71f
     47 ; CHECK:    String: 0x{{[0-9a-f]*}} "_ZNK5clang12OverrideAttr5cloneERNS_10ASTContextE"
     48 ; CHECK:    String: 0x{{[0-9a-f]*}} "_ZN4llvm22MachineModuleInfoMachOD2Ev"
     49 
     50 ; CHECK:  Hash 0x8c248979
     51 ; CHECK:    String: 0x{{[0-9a-f]*}} "setStmt"
     52 ; CHECK:    String: 0x{{[0-9a-f]*}} "_ZN4llvm5TwineC1Ei"
     53 
     54 source_filename = "test/DebugInfo/Generic/accel-table-hash-collisions.ll"
     55 
     56 @ForceTopDown = common global i32 0, align 4, !dbg !0
     57 @_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
     58 @_ZN5clang23DataRecursiveASTVisitorIN12_GLOBAL__N_124UnusedBackingIvarCheckerEE26TraverseCUDAKernelCallExprEPNS_18CUDAKernelCallExprE = common global i32 0, align 4, !dbg !9
     59 @_ZN4llvm16DenseMapIteratorIPNS_10MDLocationENS_6detail13DenseSetEmptyENS_10MDNodeInfoIS1_EENS3_12DenseSetPairIS2_EELb0EE23AdvancePastEmptyBucketsEv = common global i32 0, align 4, !dbg !11
     60 @_ZNK4llvm12LivePhysRegs5printERNS_11raw_ostreamE = common global i32 0, align 4, !dbg !13
     61 @_ZN4llvm15ScalarEvolution14getSignedRangeEPKNS_4SCEVE = common global i32 0, align 4, !dbg !15
     62 @k1 = common global i32 0, align 4, !dbg !17
     63 @is = common global i32 0, align 4, !dbg !19
     64 @setStmt = common global i32 0, align 4, !dbg !21
     65 @_ZN4llvm5TwineC1Ei = common global i32 0, align 4, !dbg !23
     66 @_ZNK5clang12OverrideAttr5cloneERNS_10ASTContextE = common global i32 0, align 4, !dbg !25
     67 @_ZN4llvm22MachineModuleInfoMachOD2Ev = common global i32 0, align 4, !dbg !27
     68 
     69 !llvm.dbg.cu = !{!2}
     70 !llvm.module.flags = !{!29, !30, !31}
     71 !llvm.ident = !{!32}
     72 
     73 !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
     74 !1 = !DIGlobalVariable(name: "ForceTopDown", scope: !2, file: !3, line: 1, type: !8, isLocal: false, isDefinition: true)
     75 !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)
     76 !3 = !DIFile(filename: "hash-collisions.c", directory: "/tmp")
     77 !4 = !{}
     78 !5 = !{!0, !6, !9, !11, !13, !15, !17, !19, !21, !23, !25, !27}
     79 !6 = !DIGlobalVariableExpression(var: !7, expr: !DIExpression())
     80 !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)
     81 !8 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
     82 !9 = !DIGlobalVariableExpression(var: !10, expr: !DIExpression())
     83 !10 = !DIGlobalVariable(name: "_ZN5clang23DataRecursiveASTVisitorIN12_GLOBAL__N_124UnusedBackingIvarCheckerEE26TraverseCUDAKernelCallExprEPNS_18CUDAKernelCallExprE", scope: !2, file: !3, line: 3, type: !8, isLocal: false, isDefinition: true)
     84 !11 = !DIGlobalVariableExpression(var: !12, expr: !DIExpression())
     85 !12 = !DIGlobalVariable(name: "_ZN4llvm16DenseMapIteratorIPNS_10MDLocationENS_6detail13DenseSetEmptyENS_10MDNodeInfoIS1_EENS3_12DenseSetPairIS2_EELb0EE23AdvancePastEmptyBucketsEv", scope: !2, file: !3, line: 4, type: !8, isLocal: false, isDefinition: true)
     86 !13 = !DIGlobalVariableExpression(var: !14, expr: !DIExpression())
     87 !14 = !DIGlobalVariable(name: "_ZNK4llvm12LivePhysRegs5printERNS_11raw_ostreamE", scope: !2, file: !3, line: 5, type: !8, isLocal: false, isDefinition: true)
     88 !15 = !DIGlobalVariableExpression(var: !16, expr: !DIExpression())
     89 !16 = !DIGlobalVariable(name: "_ZN4llvm15ScalarEvolution14getSignedRangeEPKNS_4SCEVE", scope: !2, file: !3, line: 6, type: !8, isLocal: false, isDefinition: true)
     90 !17 = !DIGlobalVariableExpression(var: !18, expr: !DIExpression())
     91 !18 = !DIGlobalVariable(name: "k1", scope: !2, file: !3, line: 7, type: !8, isLocal: false, isDefinition: true)
     92 !19 = !DIGlobalVariableExpression(var: !20, expr: !DIExpression())
     93 !20 = !DIGlobalVariable(name: "is", scope: !2, file: !3, line: 8, type: !8, isLocal: false, isDefinition: true)
     94 !21 = !DIGlobalVariableExpression(var: !22, expr: !DIExpression())
     95 !22 = !DIGlobalVariable(name: "setStmt", scope: !2, file: !3, line: 9, type: !8, isLocal: false, isDefinition: true)
     96 !23 = !DIGlobalVariableExpression(var: !24, expr: !DIExpression())
     97 !24 = !DIGlobalVariable(name: "_ZN4llvm5TwineC1Ei", scope: !2, file: !3, line: 10, type: !8, isLocal: false, isDefinition: true)
     98 !25 = !DIGlobalVariableExpression(var: !26, expr: !DIExpression())
     99 !26 = !DIGlobalVariable(name: "_ZNK5clang12OverrideAttr5cloneERNS_10ASTContextE", scope: !2, file: !3, line: 11, type: !8, isLocal: false, isDefinition: true)
    100 !27 = !DIGlobalVariableExpression(var: !28, expr: !DIExpression())
    101 !28 = !DIGlobalVariable(name: "_ZN4llvm22MachineModuleInfoMachOD2Ev", scope: !2, file: !3, line: 12, type: !8, isLocal: false, isDefinition: true)
    102 !29 = !{i32 2, !"Dwarf Version", i32 2}
    103 !30 = !{i32 2, !"Debug Info Version", i32 3}
    104 !31 = !{i32 1, !"PIC Level", i32 2}
    105 !32 = !{!"clang version 3.7.0 (trunk 231548) (llvm/trunk 231547)"}
    106 
    107