1 //===- FieldListRecordBuilder.h ---------------------------------*- 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 #ifndef LLVM_DEBUGINFO_CODEVIEW_FIELDLISTRECORDBUILDER_H 11 #define LLVM_DEBUGINFO_CODEVIEW_FIELDLISTRECORDBUILDER_H 12 13 #include "llvm/DebugInfo/CodeView/ListRecordBuilder.h" 14 #include "llvm/DebugInfo/CodeView/TypeRecord.h" 15 16 namespace llvm { 17 namespace codeview { 18 19 class MethodInfo { 20 public: MethodInfo()21 MethodInfo() : Access(), Kind(), Options(), Type(), VTableSlotOffset(-1) {} 22 MethodInfo(MemberAccess Access,MethodKind Kind,MethodOptions Options,TypeIndex Type,int32_t VTableSlotOffset)23 MethodInfo(MemberAccess Access, MethodKind Kind, MethodOptions Options, 24 TypeIndex Type, int32_t VTableSlotOffset) 25 : Access(Access), Kind(Kind), Options(Options), Type(Type), 26 VTableSlotOffset(VTableSlotOffset) {} 27 getAccess()28 MemberAccess getAccess() const { return Access; } getKind()29 MethodKind getKind() const { return Kind; } getOptions()30 MethodOptions getOptions() const { return Options; } getType()31 TypeIndex getType() const { return Type; } getVTableSlotOffset()32 int32_t getVTableSlotOffset() const { return VTableSlotOffset; } 33 34 private: 35 MemberAccess Access; 36 MethodKind Kind; 37 MethodOptions Options; 38 TypeIndex Type; 39 int32_t VTableSlotOffset; 40 }; 41 42 class FieldListRecordBuilder : public ListRecordBuilder { 43 private: 44 FieldListRecordBuilder(const FieldListRecordBuilder &) = delete; 45 void operator=(const FieldListRecordBuilder &) = delete; 46 47 public: 48 FieldListRecordBuilder(); 49 reset()50 void reset() { ListRecordBuilder::reset(); } 51 52 void writeBaseClass(const BaseClassRecord &Record); 53 void writeEnumerator(const EnumeratorRecord &Record); 54 void writeDataMember(const DataMemberRecord &Record); 55 void writeOneMethod(const OneMethodRecord &Record); 56 void writeOverloadedMethod(const OverloadedMethodRecord &Record); 57 void writeNestedType(const NestedTypeRecord &Record); 58 void writeStaticDataMember(const StaticDataMemberRecord &Record); 59 void writeVirtualBaseClass(const VirtualBaseClassRecord &Record); 60 void writeVFPtr(const VFPtrRecord &Type); 61 }; 62 } 63 } 64 65 #endif 66