1 //===- CVTypeVisitor.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_CVTYPEVISITOR_H
11 #define LLVM_DEBUGINFO_CODEVIEW_CVTYPEVISITOR_H
13 #include "llvm/DebugInfo/CodeView/CVRecord.h"
14 #include "llvm/DebugInfo/CodeView/TypeRecord.h"
15 #include "llvm/Support/Error.h"
20 class TypeServerHandler;
21 class TypeVisitorCallbacks;
23 enum VisitorDataSource {
24 VDS_BytesPresent, // The record bytes are passed into the the visitation
25 // function. The algorithm should first deserialize them
26 // before passing them on through the pipeline.
27 VDS_BytesExternal // The record bytes are not present, and it is the
28 // responsibility of the visitor callback interface to
32 Error visitTypeRecord(CVType &Record, TypeIndex Index,
33 TypeVisitorCallbacks &Callbacks,
34 VisitorDataSource Source = VDS_BytesPresent,
35 TypeServerHandler *TS = nullptr);
36 Error visitTypeRecord(CVType &Record, TypeVisitorCallbacks &Callbacks,
37 VisitorDataSource Source = VDS_BytesPresent,
38 TypeServerHandler *TS = nullptr);
40 Error visitMemberRecord(CVMemberRecord Record, TypeVisitorCallbacks &Callbacks,
41 VisitorDataSource Source = VDS_BytesPresent);
42 Error visitMemberRecord(TypeLeafKind Kind, ArrayRef<uint8_t> Record,
43 TypeVisitorCallbacks &Callbacks);
45 Error visitMemberRecordStream(ArrayRef<uint8_t> FieldList,
46 TypeVisitorCallbacks &Callbacks);
48 Error visitTypeStream(const CVTypeArray &Types, TypeVisitorCallbacks &Callbacks,
49 VisitorDataSource Source = VDS_BytesPresent,
50 TypeServerHandler *TS = nullptr);
51 Error visitTypeStream(CVTypeRange Types, TypeVisitorCallbacks &Callbacks,
52 TypeServerHandler *TS = nullptr);
53 Error visitTypeStream(TypeCollection &Types, TypeVisitorCallbacks &Callbacks,
54 TypeServerHandler *TS = nullptr);
56 } // end namespace codeview
57 } // end namespace llvm
59 #endif // LLVM_DEBUGINFO_CODEVIEW_CVTYPEVISITOR_H