1//===-- CodeViewTypes.def - All CodeView leaf types -------------*- C++ -*-===// 2// 3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4// See https://llvm.org/LICENSE.txt for license information. 5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6// 7//===----------------------------------------------------------------------===// 8// 9// See LEAF_ENUM_e in cvinfo.h. This should match the constants there. 10// 11//===----------------------------------------------------------------------===// 12 13// If the type is known, then we have a record describing it in TypeRecord.h. 14 15#ifndef CV_TYPE 16#define CV_TYPE(lf_ename, value) 17#endif 18 19// If the type is known, then we have a record describing it in TypeRecord.h. 20#ifndef TYPE_RECORD 21#define TYPE_RECORD(lf_ename, value, name) CV_TYPE(lf_ename, value) 22#endif 23 24#ifndef TYPE_RECORD_ALIAS 25#define TYPE_RECORD_ALIAS(lf_ename, value, name, alias_name) \ 26 TYPE_RECORD(lf_ename, value, name) 27#endif 28 29#ifndef MEMBER_RECORD 30#define MEMBER_RECORD(lf_ename, value, name) TYPE_RECORD(lf_ename, value, name) 31#endif 32 33#ifndef MEMBER_RECORD_ALIAS 34#define MEMBER_RECORD_ALIAS(lf_ename, value, name, alias_name) \ 35 MEMBER_RECORD(lf_ename, value, name) 36#endif 37 38TYPE_RECORD(LF_POINTER, 0x1002, Pointer) 39TYPE_RECORD(LF_MODIFIER, 0x1001, Modifier) 40TYPE_RECORD(LF_PROCEDURE, 0x1008, Procedure) 41TYPE_RECORD(LF_MFUNCTION, 0x1009, MemberFunction) 42TYPE_RECORD(LF_LABEL, 0x000e, Label) 43TYPE_RECORD(LF_ARGLIST, 0x1201, ArgList) 44 45TYPE_RECORD(LF_FIELDLIST, 0x1203, FieldList) 46 47TYPE_RECORD(LF_ARRAY, 0x1503, Array) 48TYPE_RECORD(LF_CLASS, 0x1504, Class) 49TYPE_RECORD_ALIAS(LF_STRUCTURE, 0x1505, Struct, Class) 50TYPE_RECORD_ALIAS(LF_INTERFACE, 0x1519, Interface, Class) 51TYPE_RECORD(LF_UNION, 0x1506, Union) 52TYPE_RECORD(LF_ENUM, 0x1507, Enum) 53TYPE_RECORD(LF_TYPESERVER2, 0x1515, TypeServer2) 54TYPE_RECORD(LF_VFTABLE, 0x151d, VFTable) 55TYPE_RECORD(LF_VTSHAPE, 0x000a, VFTableShape) 56 57TYPE_RECORD(LF_BITFIELD, 0x1205, BitField) 58 59// Member type records. These are generally not length prefixed, and appear 60// inside of a field list record. 61MEMBER_RECORD(LF_BCLASS, 0x1400, BaseClass) 62MEMBER_RECORD_ALIAS(LF_BINTERFACE, 0x151a, BaseInterface, BaseClass) 63 64MEMBER_RECORD(LF_VBCLASS, 0x1401, VirtualBaseClass) 65MEMBER_RECORD_ALIAS(LF_IVBCLASS, 0x1402, IndirectVirtualBaseClass, 66 VirtualBaseClass) 67 68MEMBER_RECORD(LF_VFUNCTAB, 0x1409, VFPtr) 69MEMBER_RECORD(LF_STMEMBER, 0x150e, StaticDataMember) 70MEMBER_RECORD(LF_METHOD, 0x150f, OverloadedMethod) 71MEMBER_RECORD(LF_MEMBER, 0x150d, DataMember) 72MEMBER_RECORD(LF_NESTTYPE, 0x1510, NestedType) 73MEMBER_RECORD(LF_ONEMETHOD, 0x1511, OneMethod) 74MEMBER_RECORD(LF_ENUMERATE, 0x1502, Enumerator) 75MEMBER_RECORD(LF_INDEX, 0x1404, ListContinuation) 76 77// ID leaf records. Subsequent leaf types may be referenced from .debug$S. 78TYPE_RECORD(LF_FUNC_ID, 0x1601, FuncId) 79TYPE_RECORD(LF_MFUNC_ID, 0x1602, MemberFuncId) 80TYPE_RECORD(LF_BUILDINFO, 0x1603, BuildInfo) 81TYPE_RECORD(LF_SUBSTR_LIST, 0x1604, StringList) 82TYPE_RECORD(LF_STRING_ID, 0x1605, StringId) 83TYPE_RECORD(LF_UDT_SRC_LINE, 0x1606, UdtSourceLine) 84TYPE_RECORD(LF_UDT_MOD_SRC_LINE, 0x1607, UdtModSourceLine) 85 86 87TYPE_RECORD(LF_METHODLIST, 0x1206, MethodOverloadList) 88 89TYPE_RECORD(LF_PRECOMP, 0x1509, Precomp) 90TYPE_RECORD(LF_ENDPRECOMP, 0x0014, EndPrecomp) 91 92// 16 bit type records. 93CV_TYPE(LF_MODIFIER_16t, 0x0001) 94CV_TYPE(LF_POINTER_16t, 0x0002) 95CV_TYPE(LF_ARRAY_16t, 0x0003) 96CV_TYPE(LF_CLASS_16t, 0x0004) 97CV_TYPE(LF_STRUCTURE_16t, 0x0005) 98CV_TYPE(LF_UNION_16t, 0x0006) 99CV_TYPE(LF_ENUM_16t, 0x0007) 100CV_TYPE(LF_PROCEDURE_16t, 0x0008) 101CV_TYPE(LF_MFUNCTION_16t, 0x0009) 102CV_TYPE(LF_COBOL0_16t, 0x000b) 103CV_TYPE(LF_COBOL1, 0x000c) 104CV_TYPE(LF_BARRAY_16t, 0x000d) 105CV_TYPE(LF_NULLLEAF, 0x000f) // LF_NULL 106CV_TYPE(LF_NOTTRAN, 0x0010) 107CV_TYPE(LF_DIMARRAY_16t, 0x0011) 108CV_TYPE(LF_VFTPATH_16t, 0x0012) 109CV_TYPE(LF_PRECOMP_16t, 0x0013) 110CV_TYPE(LF_OEM_16t, 0x0015) 111CV_TYPE(LF_TYPESERVER_ST, 0x0016) 112 113CV_TYPE(LF_SKIP_16t, 0x0200) 114CV_TYPE(LF_ARGLIST_16t, 0x0201) 115CV_TYPE(LF_DEFARG_16t, 0x0202) 116CV_TYPE(LF_LIST, 0x0203) 117CV_TYPE(LF_FIELDLIST_16t, 0x0204) 118CV_TYPE(LF_DERIVED_16t, 0x0205) 119CV_TYPE(LF_BITFIELD_16t, 0x0206) 120CV_TYPE(LF_METHODLIST_16t, 0x0207) 121CV_TYPE(LF_DIMCONU_16t, 0x0208) 122CV_TYPE(LF_DIMCONLU_16t, 0x0209) 123CV_TYPE(LF_DIMVARU_16t, 0x020a) 124CV_TYPE(LF_DIMVARLU_16t, 0x020b) 125CV_TYPE(LF_REFSYM, 0x020c) 126 127// 16 bit member types. Generally not length prefixed. 128CV_TYPE(LF_BCLASS_16t, 0x0400) 129CV_TYPE(LF_VBCLASS_16t, 0x0401) 130CV_TYPE(LF_IVBCLASS_16t, 0x0402) 131CV_TYPE(LF_ENUMERATE_ST, 0x0403) 132CV_TYPE(LF_FRIENDFCN_16t, 0x0404) 133CV_TYPE(LF_INDEX_16t, 0x0405) 134CV_TYPE(LF_MEMBER_16t, 0x0406) 135CV_TYPE(LF_STMEMBER_16t, 0x0407) 136CV_TYPE(LF_METHOD_16t, 0x0408) 137CV_TYPE(LF_NESTTYPE_16t, 0x0409) 138CV_TYPE(LF_VFUNCTAB_16t, 0x040a) 139CV_TYPE(LF_FRIENDCLS_16t, 0x040b) 140CV_TYPE(LF_ONEMETHOD_16t, 0x040c) 141CV_TYPE(LF_VFUNCOFF_16t, 0x040d) 142 143CV_TYPE(LF_TI16_MAX, 0x1000) 144 145CV_TYPE(LF_ARRAY_ST, 0x1003) 146CV_TYPE(LF_CLASS_ST, 0x1004) 147CV_TYPE(LF_STRUCTURE_ST, 0x1005) 148CV_TYPE(LF_UNION_ST, 0x1006) 149CV_TYPE(LF_ENUM_ST, 0x1007) 150CV_TYPE(LF_COBOL0, 0x100a) 151CV_TYPE(LF_BARRAY, 0x100b) 152CV_TYPE(LF_DIMARRAY_ST, 0x100c) 153CV_TYPE(LF_VFTPATH, 0x100d) 154CV_TYPE(LF_PRECOMP_ST, 0x100e) 155CV_TYPE(LF_OEM, 0x100f) 156CV_TYPE(LF_ALIAS_ST, 0x1010) 157CV_TYPE(LF_OEM2, 0x1011) 158 159CV_TYPE(LF_SKIP, 0x1200) 160CV_TYPE(LF_DEFARG_ST, 0x1202) 161CV_TYPE(LF_DERIVED, 0x1204) 162CV_TYPE(LF_DIMCONU, 0x1207) 163CV_TYPE(LF_DIMCONLU, 0x1208) 164CV_TYPE(LF_DIMVARU, 0x1209) 165CV_TYPE(LF_DIMVARLU, 0x120a) 166 167// Member type records. These are generally not length prefixed, and appear 168// inside of a field list record. 169CV_TYPE(LF_FRIENDFCN_ST, 0x1403) 170CV_TYPE(LF_MEMBER_ST, 0x1405) 171CV_TYPE(LF_STMEMBER_ST, 0x1406) 172CV_TYPE(LF_METHOD_ST, 0x1407) 173CV_TYPE(LF_NESTTYPE_ST, 0x1408) 174CV_TYPE(LF_FRIENDCLS, 0x140a) 175CV_TYPE(LF_ONEMETHOD_ST, 0x140b) 176CV_TYPE(LF_VFUNCOFF, 0x140c) 177CV_TYPE(LF_NESTTYPEEX_ST, 0x140d) 178CV_TYPE(LF_MEMBERMODIFY_ST, 0x140e) 179CV_TYPE(LF_MANAGED_ST, 0x140f) 180 181CV_TYPE(LF_ST_MAX, 0x1500) 182CV_TYPE(LF_TYPESERVER, 0x1501) 183CV_TYPE(LF_DIMARRAY, 0x1508) 184CV_TYPE(LF_ALIAS, 0x150a) 185CV_TYPE(LF_DEFARG, 0x150b) 186CV_TYPE(LF_FRIENDFCN, 0x150c) 187CV_TYPE(LF_NESTTYPEEX, 0x1512) 188CV_TYPE(LF_MEMBERMODIFY, 0x1513) 189CV_TYPE(LF_MANAGED, 0x1514) 190CV_TYPE(LF_STRIDED_ARRAY, 0x1516) 191CV_TYPE(LF_HLSL, 0x1517) 192CV_TYPE(LF_MODIFIER_EX, 0x1518) 193CV_TYPE(LF_VECTOR, 0x151b) 194CV_TYPE(LF_MATRIX, 0x151c) 195 196// ID leaf records. Subsequent leaf types may be referenced from .debug$S. 197 198// Numeric leaf types. These are generally contained in other records, and not 199// encountered in the main type stream. 200 201CV_TYPE(LF_NUMERIC, 0x8000) 202CV_TYPE(LF_CHAR, 0x8000) 203CV_TYPE(LF_SHORT, 0x8001) 204CV_TYPE(LF_USHORT, 0x8002) 205CV_TYPE(LF_LONG, 0x8003) 206CV_TYPE(LF_ULONG, 0x8004) 207CV_TYPE(LF_REAL32, 0x8005) 208CV_TYPE(LF_REAL64, 0x8006) 209CV_TYPE(LF_REAL80, 0x8007) 210CV_TYPE(LF_REAL128, 0x8008) 211CV_TYPE(LF_QUADWORD, 0x8009) 212CV_TYPE(LF_UQUADWORD, 0x800a) 213CV_TYPE(LF_REAL48, 0x800b) 214CV_TYPE(LF_COMPLEX32, 0x800c) 215CV_TYPE(LF_COMPLEX64, 0x800d) 216CV_TYPE(LF_COMPLEX80, 0x800e) 217CV_TYPE(LF_COMPLEX128, 0x800f) 218CV_TYPE(LF_VARSTRING, 0x8010) 219CV_TYPE(LF_OCTWORD, 0x8017) 220CV_TYPE(LF_UOCTWORD, 0x8018) 221CV_TYPE(LF_DECIMAL, 0x8019) 222CV_TYPE(LF_DATE, 0x801a) 223CV_TYPE(LF_UTF8STRING, 0x801b) 224CV_TYPE(LF_REAL16, 0x801c) 225 226// Padding bytes. These are emitted into alignment bytes in the type stream. 227 228CV_TYPE(LF_PAD0, 0xf0) 229CV_TYPE(LF_PAD1, 0xf1) 230CV_TYPE(LF_PAD2, 0xf2) 231CV_TYPE(LF_PAD3, 0xf3) 232CV_TYPE(LF_PAD4, 0xf4) 233CV_TYPE(LF_PAD5, 0xf5) 234CV_TYPE(LF_PAD6, 0xf6) 235CV_TYPE(LF_PAD7, 0xf7) 236CV_TYPE(LF_PAD8, 0xf8) 237CV_TYPE(LF_PAD9, 0xf9) 238CV_TYPE(LF_PAD10, 0xfa) 239CV_TYPE(LF_PAD11, 0xfb) 240CV_TYPE(LF_PAD12, 0xfc) 241CV_TYPE(LF_PAD13, 0xfd) 242CV_TYPE(LF_PAD14, 0xfe) 243CV_TYPE(LF_PAD15, 0xff) 244 245#undef CV_TYPE 246#undef TYPE_RECORD 247#undef TYPE_RECORD_ALIAS 248#undef MEMBER_RECORD 249#undef MEMBER_RECORD_ALIAS 250