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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
| # In file 1 we set up some basic types and IDs to refer to them. In this file
# we will set up the same types. For some of them we will make them identical
# but re-order the records in the file to make sure they have different type
# indices and appear in different orders. In other cases we will make slight
# adjustments to the types, to ensure that they do not get merged in.
#
# For easy understanding, a semantic representation of the types we will set up
# is as follows:
# - int main(int, char**) // This record should share an LF_PROCEDURE and id
# // record with corresponding function from the
# // first file.
# - int main2(int, char**) // This record should share the LF_PROCEDURE
# // record but have a unique id record.
# - void foo(int, char**) // This record should have a unique LF_PROCEDURE
# // record, but the LF_ARGLIST record internally
# // should be shared.
#
# - struct FooBar { // Because the type of this record exactly matches
# // the corresponding file, its entire type record
# // hierarchy should be shared.
# public:
# void *FooMember;
# void FooMethod2(int); // Note that the *type* of this member should be
# // the same as the type of the record from the
# // first stream. But since it has a different
# // name, it will not share an id record.
# };
TpiStream:
Records:
# TypeIndex: 4096 (0x1000)
# (int)
- Kind: LF_ARGLIST
ArgList:
ArgIndices: [ 116 ]
# TypeIndex: 4097 (0x1001)
# public void *FooMember
- Kind: LF_FIELDLIST
FieldList:
- Kind: LF_MEMBER
DataMember:
Attrs: 3 # public
Type: 1027 # void*
FieldOffset: 0
Name: FooMember # FooMember
# TypeIndex: 4098 (0x1002)
# char**
- Kind: LF_POINTER
Pointer:
ReferentType: 1136
Attrs: 32778
# TypeIndex: 4099 (0x1003)
# (int, char**)
- Kind: LF_ARGLIST
ArgList:
ArgIndices: [ 116, 4098 ]
# TypeIndex: 4100 (0x1004)
# struct FooBar {
# public:
# void *FooMember;
# };
- Kind: LF_STRUCTURE
Class:
MemberCount: 1
Options: [ None, HasUniqueName ]
FieldList: 4097
Name: FooBar
UniqueName: 'FooBar'
DerivationList: 0
VTableShape: 0
Size: 4
# TypeIndex: 4101 (0x1005)
# void (int, char**)
- Kind: LF_PROCEDURE
Procedure:
ReturnType: 3 # void
CallConv: NearC
Options: [ None ]
ParameterCount: 2
ArgumentList: 4099 # (int, char**)
# TypeIndex: 4102 (0x1006)
# FooBar *
- Kind: LF_POINTER
Pointer:
ReferentType: 4100 # FooBar
Attrs: 32778
# TypeIndex: 4103 (0x1007)
# int (int, char**)
- Kind: LF_PROCEDURE
Procedure:
ReturnType: 116 # int
CallConv: NearC
Options: [ None ]
ParameterCount: 2
ArgumentList: 4099 # (int, char**)
# TypeIndex: 4104 (0x1008)
- Kind: LF_MFUNCTION
MemberFunction:
ReturnType: 3 # void
ClassType: 4100 # struct FooBar
ThisType: 4102 # FooBar *
CallConv: ThisCall
Options: [ None, Constructor ]
ParameterCount: 1
ArgumentList: 4096 # (int)
ThisPointerAdjustment: 0
IpiStream:
Records:
# TypeIndex: 4096 (0x1000)
# struct FooBar
- Kind: LF_UDT_MOD_SRC_LINE
UdtModSourceLine:
UDT: 4100 # struct FooBar
SourceFile: 0 # We don't support this yet
LineNumber: 0
Module: 0 # We don't support this yet
# TypeIndex: 4097 (0x1001)
# int main2(int, char **)
- Kind: LF_FUNC_ID
FuncId:
ParentScope: 0
FunctionType: 4103 # int main2(int, char**)
Name: main2
# TypeIndex: 4098 (0x1002)
# void foo(int, char **)
- Kind: LF_FUNC_ID
FuncId:
ParentScope: 0
FunctionType: 4101 # void main2(int, char**)
Name: foo
# TypeIndex: 4099 (0x1003)
# void FooBar::FooMethod2(int)
- Kind: LF_MFUNC_ID
MemberFuncId:
ClassType: 4100 # struct FooBar
FunctionType: 4104 # void FooBar::FooMethod2(int)
Name: FooMethod2
# TypeIndex: 4100 (0x1004)
# int main(int, char **)
- Kind: LF_FUNC_ID
FuncId:
ParentScope: 0
FunctionType: 4103 # int main(int, char**)
Name: main
|