]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/include/llvm/DebugInfo/CodeView/CVTypeVisitor.h
Merge llvm, clang, lld, lldb, compiler-rt and libc++ r302418, and update
[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/ADT/TinyPtrVector.h"
14 #include "llvm/DebugInfo/CodeView/CVRecord.h"
15 #include "llvm/DebugInfo/CodeView/TypeRecord.h"
16 #include "llvm/DebugInfo/CodeView/TypeServerHandler.h"
17 #include "llvm/DebugInfo/CodeView/TypeVisitorCallbacks.h"
18 #include "llvm/Support/Error.h"
19
20 namespace llvm {
21 namespace codeview {
22
23 class CVTypeVisitor {
24 public:
25   explicit CVTypeVisitor(TypeVisitorCallbacks &Callbacks);
26
27   void addTypeServerHandler(TypeServerHandler &Handler);
28
29   Error visitTypeRecord(CVType &Record);
30   Error visitMemberRecord(CVMemberRecord &Record);
31
32   /// Visits the type records in Data. Sets the error flag on parse failures.
33   Error visitTypeStream(const CVTypeArray &Types);
34   Error visitTypeStream(CVTypeRange Types);
35
36   Error visitFieldListMemberStream(ArrayRef<uint8_t> FieldList);
37   Error visitFieldListMemberStream(BinaryStreamReader Reader);
38
39 private:
40   /// The interface to the class that gets notified of each visitation.
41   TypeVisitorCallbacks &Callbacks;
42
43   TinyPtrVector<TypeServerHandler *> Handlers;
44 };
45
46 } // end namespace codeview
47 } // end namespace llvm
48
49 #endif // LLVM_DEBUGINFO_CODEVIEW_CVTYPEVISITOR_H