xref: /llvm-project/llvm/test/DebugInfo/PDB/pdbdump-merge-ids-and-types.test (revision eae44dfee97ef224da14ec77527f3a102d31d654)
1; RUN: llvm-pdbutil yaml2pdb -pdb=%t.1.pdb %p/Inputs/merge-ids-and-types-1.yaml
2; RUN: llvm-pdbutil yaml2pdb -pdb=%t.2.pdb %p/Inputs/merge-ids-and-types-2.yaml
3; RUN: llvm-pdbutil merge -pdb=%t.3.pdb %t.1.pdb %t.2.pdb
4; RUN: llvm-pdbutil dump -types %t.3.pdb | FileCheck -check-prefix=TPI-TYPES %s
5; RUN: llvm-pdbutil dump -ids %t.3.pdb | FileCheck -check-prefix=IPI-TYPES %s
6
7TPI-TYPES:                          Types (TPI Stream)
8TPI-TYPES-NEXT: ============================================================
9TPI-TYPES-NEXT:   Showing 9 records
10TPI-TYPES-NEXT:   0x1000 | LF_POINTER [size = 12]
11TPI-TYPES-NEXT:            referent = 0x0470 (char*), mode = pointer, opts = None, kind = ptr32
12TPI-TYPES-NEXT:   0x1001 | LF_FIELDLIST [size = 24]
13TPI-TYPES-NEXT:            - LF_MEMBER [name = `FooMember`, Type = 0x0403 (void*), offset = 0, attrs = public]
14TPI-TYPES-NEXT:   0x1002 | LF_ARGLIST [size = 16]
15TPI-TYPES-NEXT:            0x0074 (int): `int`
16TPI-TYPES-NEXT:            0x1000: `char**`
17TPI-TYPES-NEXT:   0x1003 | LF_STRUCTURE [size = 36] `FooBar`
18TPI-TYPES-NEXT:            unique name: `FooBar`
19TPI-TYPES-NEXT:            vtable: <no type>, base list: <no type>, field list: 0x1001
20TPI-TYPES-NEXT:            options: has unique name
21TPI-TYPES-NEXT:   0x1004 | LF_POINTER [size = 12]
22TPI-TYPES-NEXT:            referent = 0x1003, mode = pointer, opts = None, kind = ptr32
23TPI-TYPES-NEXT:   0x1005 | LF_ARGLIST [size = 12]
24TPI-TYPES-NEXT:            0x0074 (int): `int`
25TPI-TYPES-NEXT:   0x1006 | LF_MFUNCTION [size = 28]
26TPI-TYPES-NEXT:            return type = 0x0003 (void), # args = 1, param list = 0x1005
27TPI-TYPES-NEXT:            class type = 0x1003, this type = 0x1004, this adjust = 0
28TPI-TYPES-NEXT:            calling conv = thiscall, options = constructor
29TPI-TYPES-NEXT:   0x1007 | LF_PROCEDURE [size = 16]
30TPI-TYPES-NEXT:            return type = 0x0074 (int), # args = 2, param list = 0x1002
31TPI-TYPES-NEXT:            calling conv = cdecl, options = None
32TPI-TYPES-NEXT:   0x1008 | LF_PROCEDURE [size = 16]
33TPI-TYPES-NEXT:            return type = 0x0003 (void), # args = 2, param list = 0x1002
34TPI-TYPES-NEXT:            calling conv = cdecl, options = None
35
36IPI-TYPES:                          Types (IPI Stream)
37IPI-TYPES-NEXT: ============================================================
38IPI-TYPES-NEXT:   Showing 6 records
39IPI-TYPES-NEXT:   0x1000 | LF_FUNC_ID [size = 20]
40IPI-TYPES-NEXT:            name = main, type = 0x1007, parent scope = <no type>
41IPI-TYPES-NEXT:   0x1001 | LF_MFUNC_ID [size = 24]
42IPI-TYPES-NEXT:            name = FooMethod, type = 0x1006, class type = 0x1003
43IPI-TYPES-NEXT:   0x1002 | LF_UDT_MOD_SRC_LINE [size = 20]
44IPI-TYPES-NEXT:            udt = 0x1003, mod = 0, file = 0, line = 0
45IPI-TYPES-NEXT:   0x1003 | LF_FUNC_ID [size = 20]
46IPI-TYPES-NEXT:            name = main2, type = 0x1007, parent scope = <no type>
47IPI-TYPES-NEXT:   0x1004 | LF_FUNC_ID [size = 16]
48IPI-TYPES-NEXT:            name = foo, type = 0x1008, parent scope = <no type>
49IPI-TYPES-NEXT:   0x1005 | LF_MFUNC_ID [size = 24]
50IPI-TYPES-NEXT:            name = FooMethod2, type = 0x1006, class type = 0x1003
51