• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1RUN: yaml2obj %p/Inputs/obj-hashes-1.yaml > %T/obj-hashes-1.obj
2RUN: yaml2obj %p/Inputs/obj-hashes-2.yaml > %T/obj-hashes-2.obj
3RUN: echo obj-hashes-1 > %T/hashes-combined.out
4RUN: llvm-pdbutil dump -type-extras %T/obj-hashes-1.obj >> %T/hashes-combined.out
5RUN: echo obj-hashes-2 >> %T/hashes-combined.out
6RUN: llvm-pdbutil dump -type-extras %T/obj-hashes-2.obj >> %T/hashes-combined.out
7RUN: cat %T/hashes-combined.out | FileCheck --check-prefix=CHECK-ONE %s
8RUN: cat %T/hashes-combined.out | FileCheck --check-prefix=CHECK-TWO %s
9RUN: cat %T/hashes-combined.out | FileCheck --check-prefix=CHECK-THREE %s
10RUN: cat %T/hashes-combined.out | FileCheck --check-prefix=CHECK-FOUR %s
11RUN: cat %T/hashes-combined.out | FileCheck --check-prefix=CHECK-FIVE %s
12RUN: 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.
16CHECK-ONE:   obj-hashes-1
17CHECK-ONE:   TI: 0x1001, LocalHash: {{.*}}, GlobalHash: A7F8CF106F39A384
18CHECK-ONE:   obj-hashes-2
19CHECK-ONE:   TI: 0x1000, LocalHash: {{.*}}, GlobalHash: A7F8CF106F39A384
20
21; int**.  Same as char**, both the local and global hashes should be the same.
22CHECK-TWO:   obj-hashes-1
23CHECK-TWO:   TI: 0x1000, LocalHash: {{.*}}, GlobalHash: 95D0616C5962F4B1
24CHECK-TWO:   obj-hashes-2
25CHECK-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.
30CHECK-THREE: obj-hashes-1
31CHECK-THREE: TI: 0x1002, LocalHash: {{.*}}, GlobalHash: 48D95F14F6176F4F
32CHECK-THREE: obj-hashes-2
33CHECK-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.
39CHECK-FOUR:  obj-hashes-1
40CHECK-FOUR:  TI: 0x1003, LocalHash: {{.*}}, GlobalHash: 99410CD14F5EE80D
41CHECK-FOUR:  obj-hashes-2
42CHECK-FOUR:  TI: 0x1004, LocalHash: {{.*}}, GlobalHash: 99410CD14F5EE80D
43
44; double**.  This is only in stream 2, as a means to throw off the indexing.
45CHECK-FIVE:  obj-hashes-1
46CHECK-FIVE:  obj-hashes-2
47CHECK-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.
51CHECK-SIX:   obj-hashes-1
52CHECK-SIX:   TI: 0x1004, LocalHash: {{.*}}, GlobalHash: 7ACF479173341AC1
53CHECK-SIX:   obj-hashes-2
54CHECK-SIX:   TI: 0x1005, LocalHash: {{.*}}, GlobalHash: 7ACF479173341AC1
55