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;
25 class MinimalTypeDumpVisitor : public codeview::TypeVisitorCallbacks {
27 MinimalTypeDumpVisitor(LinePrinter &P, uint32_t Width, bool RecordBytes,
28 bool Hashes, codeview::LazyRandomTypeCollection &Types,
29 uint32_t NumHashBuckets,
30 FixedStreamArray<support::ulittle32_t> HashValues,
31 pdb::TpiStream *Stream)
32 : P(P), Width(Width), RecordBytes(RecordBytes), Hashes(Hashes),
33 Types(Types), NumHashBuckets(NumHashBuckets), HashValues(HashValues),
36 Error visitTypeBegin(codeview::CVType &Record,
37 codeview::TypeIndex Index) override;
38 Error visitTypeEnd(codeview::CVType &Record) override;
39 Error visitMemberBegin(codeview::CVMemberRecord &Record) override;
40 Error visitMemberEnd(codeview::CVMemberRecord &Record) override;
42 #define TYPE_RECORD(EnumName, EnumVal, Name) \
43 Error visitKnownRecord(codeview::CVType &CVR, \
44 codeview::Name##Record &Record) override;
45 #define MEMBER_RECORD(EnumName, EnumVal, Name) \
46 Error visitKnownMember(codeview::CVMemberRecord &CVR, \
47 codeview::Name##Record &Record) override;
48 #define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
49 #define MEMBER_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
50 #include "llvm/DebugInfo/CodeView/CodeViewTypes.def"
53 StringRef getTypeName(codeview::TypeIndex TI) const;
57 bool RecordBytes = false;
59 codeview::LazyRandomTypeCollection &Types;
60 uint32_t NumHashBuckets;
61 codeview::TypeIndex CurrentTypeIndex;
62 FixedStreamArray<support::ulittle32_t> HashValues;
63 pdb::TpiStream *Stream = nullptr;