• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===- TypeTableBuilder.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_TYPETABLEBUILDER_H
11 #define LLVM_DEBUGINFO_CODEVIEW_TYPETABLEBUILDER_H
12 
13 #include "llvm/DebugInfo/CodeView/CodeView.h"
14 #include "llvm/DebugInfo/CodeView/TypeIndex.h"
15 #include "llvm/DebugInfo/CodeView/TypeRecord.h"
16 #include "llvm/Support/Compiler.h"
17 
18 namespace llvm {
19 
20 class StringRef;
21 
22 namespace codeview {
23 
24 class FieldListRecordBuilder;
25 class MethodListRecordBuilder;
26 class TypeRecordBuilder;
27 
28 class TypeTableBuilder {
29 private:
30   TypeTableBuilder(const TypeTableBuilder &) = delete;
31   TypeTableBuilder &operator=(const TypeTableBuilder &) = delete;
32 
33 protected:
34   TypeTableBuilder();
35 
36 public:
37   virtual ~TypeTableBuilder();
38 
39 public:
40   TypeIndex writeModifier(const ModifierRecord &Record);
41   TypeIndex writeProcedure(const ProcedureRecord &Record);
42   TypeIndex writeMemberFunction(const MemberFunctionRecord &Record);
43   TypeIndex writeArgList(const ArgListRecord &Record);
44   TypeIndex writePointer(const PointerRecord &Record);
45   TypeIndex writeArray(const ArrayRecord &Record);
46   TypeIndex writeClass(const ClassRecord &Record);
47   TypeIndex writeUnion(const UnionRecord &Record);
48   TypeIndex writeEnum(const EnumRecord &Record);
49   TypeIndex writeBitField(const BitFieldRecord &Record);
50   TypeIndex writeVFTableShape(const VFTableShapeRecord &Record);
51   TypeIndex writeStringId(const StringIdRecord &Record);
52   TypeIndex writeVFTable(const VFTableRecord &Record);
53   TypeIndex writeUdtSourceLine(const UdtSourceLineRecord &Record);
54   TypeIndex writeUdtModSourceLine(const UdtModSourceLineRecord &Record);
55   TypeIndex writeFuncId(const FuncIdRecord &Record);
56   TypeIndex writeMemberFuncId(const MemberFuncIdRecord &Record);
57   TypeIndex writeBuildInfo(const BuildInfoRecord &Record);
58   TypeIndex writeMethodOverloadList(const MethodOverloadListRecord &Record);
59   TypeIndex writeTypeServer2(const TypeServer2Record &Record);
60 
61   TypeIndex writeFieldList(FieldListRecordBuilder &FieldList);
62 
63   TypeIndex writeRecord(TypeRecordBuilder &builder);
64 
65   virtual TypeIndex writeRecord(llvm::StringRef record) = 0;
66 };
67 }
68 }
69 
70 #endif
71