File: obj-globalhash.test

package info (click to toggle)
llvm-toolchain-16 1%3A16.0.6-15~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,634,792 kB
  • sloc: cpp: 6,179,261; ansic: 1,216,205; asm: 741,319; python: 196,614; objc: 75,325; f90: 49,640; lisp: 32,396; pascal: 12,286; sh: 9,394; perl: 7,442; ml: 5,494; awk: 3,523; makefile: 2,723; javascript: 1,206; xml: 886; fortran: 581; cs: 573
file content (54 lines) | stat: -rw-r--r-- 2,826 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
RUN: yaml2obj %p/Inputs/obj-hashes-1.yaml -o %T/obj-hashes-1.obj
RUN: yaml2obj %p/Inputs/obj-hashes-2.yaml -o %T/obj-hashes-2.obj
RUN: echo obj-hashes-1 > %T/hashes-combined.out
RUN: llvm-pdbutil dump -type-extras %T/obj-hashes-1.obj >> %T/hashes-combined.out
RUN: echo obj-hashes-2 >> %T/hashes-combined.out
RUN: llvm-pdbutil dump -type-extras %T/obj-hashes-2.obj >> %T/hashes-combined.out
RUN: cat %T/hashes-combined.out | FileCheck --check-prefix=CHECK-ONE %s
RUN: cat %T/hashes-combined.out | FileCheck --check-prefix=CHECK-TWO %s
RUN: cat %T/hashes-combined.out | FileCheck --check-prefix=CHECK-THREE %s
RUN: cat %T/hashes-combined.out | FileCheck --check-prefix=CHECK-FOUR %s
RUN: cat %T/hashes-combined.out | FileCheck --check-prefix=CHECK-FIVE %s
RUN: cat %T/hashes-combined.out | FileCheck --check-prefix=CHECK-SIX %s

; char**.  Both the local and global hashes should be the same, since the only
; back-references are for simple types which have fixed indices.
CHECK-ONE:   obj-hashes-1
CHECK-ONE:   TI: 0x1001, LocalHash: {{.*}}, GlobalHash: 912CE718D99C2F74
CHECK-ONE:   obj-hashes-2
CHECK-ONE:   TI: 0x1000, LocalHash: {{.*}}, GlobalHash: 912CE718D99C2F74

; int**.  Same as char**, both the local and global hashes should be the same.
CHECK-TWO:   obj-hashes-1
CHECK-TWO:   TI: 0x1000, LocalHash: {{.*}}, GlobalHash: 20DAD105A7C67E1D
CHECK-TWO:   obj-hashes-2
CHECK-TWO:   TI: 0x1002, LocalHash: {{.*}}, GlobalHash: 20DAD105A7C67E1D

; int***. Different local hashes, since the referent type (int**) is not at the
; same TypeIndex in both streams.  Same global hash, since they represent the
; same record.
CHECK-THREE: obj-hashes-1
CHECK-THREE: TI: 0x1002, LocalHash: {{.*}}, GlobalHash: 09CBAD68AF5C7998
CHECK-THREE: obj-hashes-2
CHECK-THREE: TI: 0x1001, LocalHash: {{.*}}, GlobalHash: 09CBAD68AF5C7998

; arg list (char**, int***).  Different local hashes, since the parameter types
; both occur at different TypeIndices in their respective input streams.  Same
; global hash, since the global hash of all referenced types is the same in
; both streams.
CHECK-FOUR:  obj-hashes-1
CHECK-FOUR:  TI: 0x1003, LocalHash: {{.*}}, GlobalHash: B6A17FFA392FDF6E
CHECK-FOUR:  obj-hashes-2
CHECK-FOUR:  TI: 0x1004, LocalHash: {{.*}}, GlobalHash: B6A17FFA392FDF6E

; double**.  This is only in stream 2, as a means to throw off the indexing.
CHECK-FIVE:  obj-hashes-1
CHECK-FIVE:  obj-hashes-2
CHECK-FIVE:  TI: 0x1003, LocalHash: {{.*}}, GlobalHash: 357B0B78DBFB83B4

; int** (char**, int***).  For the same logic as described in previous records,
; these two records have the same global hash but different local hashes.
CHECK-SIX:   obj-hashes-1
CHECK-SIX:   TI: 0x1004, LocalHash: {{.*}}, GlobalHash: 8356432DE786E196
CHECK-SIX:   obj-hashes-2
CHECK-SIX:   TI: 0x1005, LocalHash: {{.*}}, GlobalHash: 8356432DE786E196