1 //===- CodeView.h -----------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_DEBUGINFO_CODEVIEW_CODEVIEW_H
11 #define LLVM_DEBUGINFO_CODEVIEW_CODEVIEW_H
18 enum class CallingConvention : uint8_t {
19 NearC = 0x00, // near right to left push, caller pops stack
20 FarC = 0x01, // far right to left push, caller pops stack
21 NearPascal = 0x02, // near left to right push, callee pops stack
22 FarPascal = 0x03, // far left to right push, callee pops stack
23 NearFast = 0x04, // near left to right push with regs, callee pops stack
24 FarFast = 0x05, // far left to right push with regs, callee pops stack
25 NearStdCall = 0x07, // near standard call
26 FarStdCall = 0x08, // far standard call
27 NearSysCall = 0x09, // near sys call
28 FarSysCall = 0x0a, // far sys call
29 ThisCall = 0x0b, // this call (this passed in register)
30 MipsCall = 0x0c, // Mips call
31 Generic = 0x0d, // Generic call sequence
32 AlphaCall = 0x0e, // Alpha call
33 PpcCall = 0x0f, // PPC call
34 SHCall = 0x10, // Hitachi SuperH call
35 ArmCall = 0x11, // ARM call
36 AM33Call = 0x12, // AM33 call
37 TriCall = 0x13, // TriCore Call
38 SH5Call = 0x14, // Hitachi SuperH-5 call
39 M32RCall = 0x15, // M32R Call
40 ClrCall = 0x16, // clr call
42 0x17, // Marker for routines always inlined and thus lacking a convention
43 NearVector = 0x18 // near left to right push with regs, callee pops stack
46 enum class ClassOptions : uint16_t {
49 HasConstructorOrDestructor = 0x0002,
50 HasOverloadedOperator = 0x0004,
52 ContainsNestedClass = 0x0010,
53 HasOverloadedAssignmentOperator = 0x0020,
54 HasConversionOperator = 0x0040,
55 ForwardReference = 0x0080,
57 HasUniqueName = 0x0200,
62 inline ClassOptions operator|(ClassOptions a, ClassOptions b) {
63 return static_cast<ClassOptions>(static_cast<uint16_t>(a) |
64 static_cast<uint16_t>(b));
67 inline ClassOptions operator&(ClassOptions a, ClassOptions b) {
68 return static_cast<ClassOptions>(static_cast<uint16_t>(a) &
69 static_cast<uint16_t>(b));
72 inline ClassOptions operator~(ClassOptions a) {
73 return static_cast<ClassOptions>(~static_cast<uint16_t>(a));
76 enum class FrameProcedureOptions : uint32_t {
78 HasAlloca = 0x00000001,
79 HasSetJmp = 0x00000002,
80 HasLongJmp = 0x00000004,
81 HasInlineAssembly = 0x00000008,
82 HasExceptionHandling = 0x00000010,
83 MarkedInline = 0x00000020,
84 HasStructuredExceptionHandling = 0x00000040,
86 SecurityChecks = 0x00000100,
87 AsynchronousExceptionHandling = 0x00000200,
88 NoStackOrderingForSecurityChecks = 0x00000400,
90 StrictSecurityChecks = 0x00001000,
91 SafeBuffers = 0x00002000,
92 ProfileGuidedOptimization = 0x00040000,
93 ValidProfileCounts = 0x00080000,
94 OptimizedForSpeed = 0x00100000,
95 GuardCfg = 0x00200000,
99 inline FrameProcedureOptions operator|(FrameProcedureOptions a,
100 FrameProcedureOptions b) {
101 return static_cast<FrameProcedureOptions>(static_cast<uint32_t>(a) |
102 static_cast<uint32_t>(b));
105 inline FrameProcedureOptions operator&(FrameProcedureOptions a,
106 FrameProcedureOptions b) {
107 return static_cast<FrameProcedureOptions>(static_cast<uint32_t>(a) &
108 static_cast<uint32_t>(b));
111 inline FrameProcedureOptions operator~(FrameProcedureOptions a) {
112 return static_cast<FrameProcedureOptions>(~static_cast<uint32_t>(a));
115 enum class FunctionOptions : uint8_t {
119 ConstructorWithVirtualBases = 0x04
122 inline FunctionOptions operator|(FunctionOptions a, FunctionOptions b) {
123 return static_cast<FunctionOptions>(static_cast<uint8_t>(a) |
124 static_cast<uint8_t>(b));
127 inline FunctionOptions operator&(FunctionOptions a, FunctionOptions b) {
128 return static_cast<FunctionOptions>(static_cast<uint8_t>(a) &
129 static_cast<uint8_t>(b));
132 inline FunctionOptions operator~(FunctionOptions a) {
133 return static_cast<FunctionOptions>(~static_cast<uint8_t>(a));
136 enum class HfaKind : uint8_t {
143 enum class MemberAccess : uint8_t {
150 enum class MethodKind : uint8_t {
155 IntroducingVirtual = 0x04,
157 PureIntroducingVirtual = 0x06
160 enum class MethodOptions : uint16_t {
163 CompilerGenerated = 0x0100,
167 inline MethodOptions operator|(MethodOptions a, MethodOptions b) {
168 return static_cast<MethodOptions>(static_cast<uint16_t>(a) |
169 static_cast<uint16_t>(b));
172 inline MethodOptions operator&(MethodOptions a, MethodOptions b) {
173 return static_cast<MethodOptions>(static_cast<uint16_t>(a) &
174 static_cast<uint16_t>(b));
177 inline MethodOptions operator~(MethodOptions a) {
178 return static_cast<MethodOptions>(~static_cast<uint16_t>(a));
181 enum class ModifierOptions : uint16_t {
188 inline ModifierOptions operator|(ModifierOptions a, ModifierOptions b) {
189 return static_cast<ModifierOptions>(static_cast<uint16_t>(a) |
190 static_cast<uint16_t>(b));
193 inline ModifierOptions operator&(ModifierOptions a, ModifierOptions b) {
194 return static_cast<ModifierOptions>(static_cast<uint16_t>(a) &
195 static_cast<uint16_t>(b));
198 inline ModifierOptions operator~(ModifierOptions a) {
199 return static_cast<ModifierOptions>(~static_cast<uint16_t>(a));
202 enum class ModuleSubstreamKind : uint32_t {
206 FileChecksums = 0xf4,
209 CrossScopeImports = 0xf7,
210 CrossScopeExports = 0xf8
213 enum class PointerKind : uint8_t {
214 Near16 = 0x00, // 16 bit pointer
215 Far16 = 0x01, // 16:16 far pointer
216 Huge16 = 0x02, // 16:16 huge pointer
217 BasedOnSegment = 0x03, // based on segment
218 BasedOnValue = 0x04, // based on value of base
219 BasedOnSegmentValue = 0x05, // based on segment value of base
220 BasedOnAddress = 0x06, // based on address of base
221 BasedOnSegmentAddress = 0x07, // based on segment address of base
222 BasedOnType = 0x08, // based on type
223 BasedOnSelf = 0x09, // based on self
224 Near32 = 0x0a, // 32 bit pointer
225 Far32 = 0x0b, // 16:32 pointer
226 Near64 = 0x0c // 64 bit pointer
229 enum class PointerMode : uint8_t {
230 Pointer = 0x00, // "normal" pointer
231 LValueReference = 0x01, // "old" reference
232 PointerToDataMember = 0x02, // pointer to data member
233 PointerToMemberFunction = 0x03, // pointer to member function
234 RValueReference = 0x04 // r-value reference
237 enum class PointerOptions : uint32_t {
240 Volatile = 0x00000200,
242 Unaligned = 0x00000800,
243 Restrict = 0x00001000,
244 WinRTSmartPointer = 0x00080000
247 inline PointerOptions operator|(PointerOptions a, PointerOptions b) {
248 return static_cast<PointerOptions>(static_cast<uint16_t>(a) |
249 static_cast<uint16_t>(b));
252 inline PointerOptions operator&(PointerOptions a, PointerOptions b) {
253 return static_cast<PointerOptions>(static_cast<uint16_t>(a) &
254 static_cast<uint16_t>(b));
257 inline PointerOptions operator~(PointerOptions a) {
258 return static_cast<PointerOptions>(~static_cast<uint16_t>(a));
261 enum class PointerToMemberRepresentation : uint16_t {
262 Unknown = 0x00, // not specified (pre VC8)
263 SingleInheritanceData = 0x01, // member data, single inheritance
264 MultipleInheritanceData = 0x02, // member data, multiple inheritance
265 VirtualInheritanceData = 0x03, // member data, virtual inheritance
266 GeneralData = 0x04, // member data, most general
267 SingleInheritanceFunction = 0x05, // member function, single inheritance
268 MultipleInheritanceFunction = 0x06, // member function, multiple inheritance
269 VirtualInheritanceFunction = 0x07, // member function, virtual inheritance
270 GeneralFunction = 0x08 // member function, most general
273 enum class TypeRecordKind : uint16_t {
276 VirtualTableShape = 0x000a,
278 EndPrecompiledHeader = 0x0014,
283 MemberFunction = 0x1009,
288 ArgumentList = 0x1201,
294 VirtualBaseClass = 0x1401,
295 IndirectVirtualBaseClass = 0x1402,
297 VirtualFunctionTablePointer = 0x1409,
307 StaticMember = 0x150e,
311 VirtualFunctionTable = 0x151d,
314 MemberFunctionId = 0x1602,
316 SubstringList = 0x1604,
318 UdtSourceLine = 0x1606,
348 enum class VirtualTableSlotKind : uint8_t {
358 enum class WindowsRTClassKind : uint8_t {