]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/include/llvm/DebugInfo/CodeView/CVTypeVisitor.h
Upgrade NetBSD tests to 01.11.2017_23.20 snapshot
[FreeBSD/FreeBSD.git] / contrib / llvm / include / llvm / DebugInfo / CodeView / CVTypeVisitor.h
1 //===- CVTypeVisitor.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_CVTYPEVISITOR_H
11 #define LLVM_DEBUGINFO_CODEVIEW_CVTYPEVISITOR_H
12
13 #include "llvm/DebugInfo/CodeView/CVRecord.h"
14 #include "llvm/DebugInfo/CodeView/TypeRecord.h"
15 #include "llvm/DebugInfo/CodeView/TypeVisitorCallbacks.h"
16 #include "llvm/Support/Error.h"
17
18 namespace llvm {
19 namespace codeview {
20
21 class CVTypeVisitor {
22 public:
23   explicit CVTypeVisitor(TypeVisitorCallbacks &Callbacks);
24
25   Error visitTypeRecord(const CVRecord<TypeLeafKind> &Record);
26
27   /// Visits the type records in Data. Sets the error flag on parse failures.
28   Error visitTypeStream(const CVTypeArray &Types);
29
30   Error skipPadding(ArrayRef<uint8_t> &Data);
31
32   /// Visits individual member records of a field list record. Member records do
33   /// not describe their own length, and need special handling.
34   Error visitFieldList(const CVRecord<TypeLeafKind> &Record);
35
36 private:
37   /// The interface to the class that gets notified of each visitation.
38   TypeVisitorCallbacks &Callbacks;
39 };
40
41 } // end namespace codeview
42 } // end namespace llvm
43
44 #endif // LLVM_DEBUGINFO_CODEVIEW_CVTYPEVISITOR_H