CVTypeVisitor.h revision 314564
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/SmallVector.h"
14#include "llvm/DebugInfo/CodeView/CVRecord.h"
15#include "llvm/DebugInfo/CodeView/TypeRecord.h"
16#include "llvm/DebugInfo/CodeView/TypeVisitorCallbacks.h"
17#include "llvm/Support/Error.h"
18
19namespace llvm {
20namespace codeview {
21
22class CVTypeVisitor {
23public:
24  explicit CVTypeVisitor(TypeVisitorCallbacks &Callbacks);
25
26  Error visitTypeRecord(CVType &Record);
27  Error visitMemberRecord(CVMemberRecord &Record);
28
29  /// Visits the type records in Data. Sets the error flag on parse failures.
30  Error visitTypeStream(const CVTypeArray &Types);
31
32  Error visitFieldListMemberStream(ArrayRef<uint8_t> FieldList);
33  Error visitFieldListMemberStream(msf::StreamReader Reader);
34
35private:
36  /// The interface to the class that gets notified of each visitation.
37  TypeVisitorCallbacks &Callbacks;
38};
39
40} // end namespace codeview
41} // end namespace llvm
42
43#endif // LLVM_DEBUGINFO_CODEVIEW_CVTYPEVISITOR_H
44