Home | History | Annotate | Download | only in PDB
      1 RUN: yaml2obj %p/Inputs/obj-hashes-1.yaml > %T/obj-hashes-1.obj
      2 RUN: yaml2obj %p/Inputs/obj-hashes-2.yaml > %T/obj-hashes-2.obj
      3 RUN: echo obj-hashes-1 > %T/hashes-combined.out
      4 RUN: llvm-pdbutil dump -type-extras %T/obj-hashes-1.obj >> %T/hashes-combined.out
      5 RUN: echo obj-hashes-2 >> %T/hashes-combined.out
      6 RUN: llvm-pdbutil dump -type-extras %T/obj-hashes-2.obj >> %T/hashes-combined.out
      7 RUN: cat %T/hashes-combined.out | FileCheck --check-prefix=CHECK-ONE %s
      8 RUN: cat %T/hashes-combined.out | FileCheck --check-prefix=CHECK-TWO %s
      9 RUN: cat %T/hashes-combined.out | FileCheck --check-prefix=CHECK-THREE %s
     10 RUN: cat %T/hashes-combined.out | FileCheck --check-prefix=CHECK-FOUR %s
     11 RUN: cat %T/hashes-combined.out | FileCheck --check-prefix=CHECK-FIVE %s
     12 RUN: cat %T/hashes-combined.out | FileCheck --check-prefix=CHECK-SIX %s
     13 
     14 ; char**.  Both the local and global hashes should be the same, since the only
     15 ; back-references are for simple types which have fixed indices.
     16 CHECK-ONE:   obj-hashes-1
     17 CHECK-ONE:   TI: 0x1001, LocalHash: {{.*}}, GlobalHash: A7F8CF106F39A384
     18 CHECK-ONE:   obj-hashes-2
     19 CHECK-ONE:   TI: 0x1000, LocalHash: {{.*}}, GlobalHash: A7F8CF106F39A384
     20 
     21 ; int**.  Same as char**, both the local and global hashes should be the same.
     22 CHECK-TWO:   obj-hashes-1
     23 CHECK-TWO:   TI: 0x1000, LocalHash: {{.*}}, GlobalHash: 95D0616C5962F4B1
     24 CHECK-TWO:   obj-hashes-2
     25 CHECK-TWO:   TI: 0x1002, LocalHash: {{.*}}, GlobalHash: 95D0616C5962F4B1
     26 
     27 ; int***. Different local hashes, since the referent type (int**) is not at the
     28 ; same TypeIndex in both streams.  Same global hash, since they represent the
     29 ; same record.
     30 CHECK-THREE: obj-hashes-1
     31 CHECK-THREE: TI: 0x1002, LocalHash: {{.*}}, GlobalHash: 48D95F14F6176F4F
     32 CHECK-THREE: obj-hashes-2
     33 CHECK-THREE: TI: 0x1001, LocalHash: {{.*}}, GlobalHash: 48D95F14F6176F4F
     34 
     35 ; arg list (char**, int***).  Different local hashes, since the parameter types
     36 ; both occur at different TypeIndices in their respective input streams.  Same
     37 ; global hash, since the global hash of all referenced types is the same in
     38 ; both streams.
     39 CHECK-FOUR:  obj-hashes-1
     40 CHECK-FOUR:  TI: 0x1003, LocalHash: {{.*}}, GlobalHash: 99410CD14F5EE80D
     41 CHECK-FOUR:  obj-hashes-2
     42 CHECK-FOUR:  TI: 0x1004, LocalHash: {{.*}}, GlobalHash: 99410CD14F5EE80D
     43 
     44 ; double**.  This is only in stream 2, as a means to throw off the indexing.
     45 CHECK-FIVE:  obj-hashes-1
     46 CHECK-FIVE:  obj-hashes-2
     47 CHECK-FIVE:  TI: 0x1003, LocalHash: {{.*}}, GlobalHash: 20691EA9B88584CC
     48 
     49 ; int** (char**, int***).  For the same logic as described in previous records,
     50 ; these two records have the same global hash but different local hashes.
     51 CHECK-SIX:   obj-hashes-1
     52 CHECK-SIX:   TI: 0x1004, LocalHash: {{.*}}, GlobalHash: 7ACF479173341AC1
     53 CHECK-SIX:   obj-hashes-2
     54 CHECK-SIX:   TI: 0x1005, LocalHash: {{.*}}, GlobalHash: 7ACF479173341AC1
     55