1 | //===- CVTypeVisitor.h ------------------------------------------*- C++ -*-===// |
2 | // |
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | // See https://llvm.org/LICENSE.txt for license information. |
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | #ifndef LLVM_DEBUGINFO_CODEVIEW_CVTYPEVISITOR_H |
10 | #define LLVM_DEBUGINFO_CODEVIEW_CVTYPEVISITOR_H |
11 | |
12 | #include "llvm/ADT/ArrayRef.h" |
13 | #include "llvm/DebugInfo/CodeView/CVRecord.h" |
14 | #include "llvm/DebugInfo/CodeView/CodeView.h" |
15 | #include "llvm/Support/Error.h" |
16 | |
17 | namespace llvm { |
18 | namespace codeview { |
19 | class TypeIndex; |
20 | class TypeCollection; |
21 | class TypeVisitorCallbacks; |
22 | struct CVMemberRecord; |
23 | |
24 | enum VisitorDataSource { |
25 | VDS_BytesPresent, // The record bytes are passed into the visitation |
26 | // function. The algorithm should first deserialize them |
27 | // before passing them on through the pipeline. |
28 | VDS_BytesExternal // The record bytes are not present, and it is the |
29 | // responsibility of the visitor callback interface to |
30 | // supply the bytes. |
31 | }; |
32 | |
33 | Error visitTypeRecord(CVType &Record, TypeIndex Index, |
34 | TypeVisitorCallbacks &Callbacks, |
35 | VisitorDataSource Source = VDS_BytesPresent); |
36 | Error visitTypeRecord(CVType &Record, TypeVisitorCallbacks &Callbacks, |
37 | VisitorDataSource Source = VDS_BytesPresent); |
38 | |
39 | Error visitMemberRecord(CVMemberRecord Record, TypeVisitorCallbacks &Callbacks, |
40 | VisitorDataSource Source = VDS_BytesPresent); |
41 | Error visitMemberRecord(TypeLeafKind Kind, ArrayRef<uint8_t> Record, |
42 | TypeVisitorCallbacks &Callbacks); |
43 | |
44 | Error visitMemberRecordStream(ArrayRef<uint8_t> FieldList, |
45 | TypeVisitorCallbacks &Callbacks); |
46 | |
47 | Error (const CVTypeArray &Types, TypeVisitorCallbacks &Callbacks, |
48 | VisitorDataSource Source = VDS_BytesPresent); |
49 | Error (CVTypeRange Types, TypeVisitorCallbacks &Callbacks); |
50 | Error visitTypeStream(TypeCollection &Types, TypeVisitorCallbacks &Callbacks); |
51 | |
52 | } // end namespace codeview |
53 | } // end namespace llvm |
54 | |
55 | #endif // LLVM_DEBUGINFO_CODEVIEW_CVTYPEVISITOR_H |
56 | |