1 //===- MinimalTypeDumper.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_TOOLS_LLVMPDBUTIL_MINIMAL_TYPE_DUMPER_H
11 #define LLVM_TOOLS_LLVMPDBUTIL_MINIMAL_TYPE_DUMPER_H
13 #include "llvm/DebugInfo/CodeView/TypeVisitorCallbacks.h"
14 #include "llvm/Support/BinaryStreamArray.h"
18 class LazyRandomTypeCollection;
24 class MinimalTypeDumpVisitor : public codeview::TypeVisitorCallbacks {
26 MinimalTypeDumpVisitor(LinePrinter &P, uint32_t Width, bool RecordBytes,
27 bool Hashes, codeview::LazyRandomTypeCollection &Types,
28 FixedStreamArray<support::ulittle32_t> HashValues)
29 : P(P), Width(Width), RecordBytes(RecordBytes), Hashes(Hashes),
30 Types(Types), HashValues(HashValues) {}
32 Error visitTypeBegin(codeview::CVType &Record,
33 codeview::TypeIndex Index) override;
34 Error visitTypeEnd(codeview::CVType &Record) override;
35 Error visitMemberBegin(codeview::CVMemberRecord &Record) override;
36 Error visitMemberEnd(codeview::CVMemberRecord &Record) override;
38 #define TYPE_RECORD(EnumName, EnumVal, Name) \
39 Error visitKnownRecord(codeview::CVType &CVR, \
40 codeview::Name##Record &Record) override;
41 #define MEMBER_RECORD(EnumName, EnumVal, Name) \
42 Error visitKnownMember(codeview::CVMemberRecord &CVR, \
43 codeview::Name##Record &Record) override;
44 #define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
45 #define MEMBER_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
46 #include "llvm/DebugInfo/CodeView/CodeViewTypes.def"
49 StringRef getTypeName(codeview::TypeIndex TI) const;
53 bool RecordBytes = false;
55 codeview::LazyRandomTypeCollection &Types;
56 FixedStreamArray<support::ulittle32_t> HashValues;