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