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 uint32_t NumHashBuckets,
29 FixedStreamArray<support::ulittle32_t> HashValues)
30 : P(P), Width(Width), RecordBytes(RecordBytes), Hashes(Hashes),
31 Types(Types), NumHashBuckets(NumHashBuckets), HashValues(HashValues) {}
33 Error visitTypeBegin(codeview::CVType &Record,
34 codeview::TypeIndex Index) override;
35 Error visitTypeEnd(codeview::CVType &Record) override;
36 Error visitMemberBegin(codeview::CVMemberRecord &Record) override;
37 Error visitMemberEnd(codeview::CVMemberRecord &Record) override;
39 #define TYPE_RECORD(EnumName, EnumVal, Name) \
40 Error visitKnownRecord(codeview::CVType &CVR, \
41 codeview::Name##Record &Record) override;
42 #define MEMBER_RECORD(EnumName, EnumVal, Name) \
43 Error visitKnownMember(codeview::CVMemberRecord &CVR, \
44 codeview::Name##Record &Record) override;
45 #define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
46 #define MEMBER_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
47 #include "llvm/DebugInfo/CodeView/CodeViewTypes.def"
50 StringRef getTypeName(codeview::TypeIndex TI) const;
54 bool RecordBytes = false;
56 codeview::LazyRandomTypeCollection &Types;
57 uint32_t NumHashBuckets;
58 FixedStreamArray<support::ulittle32_t> HashValues;