[MIPS MSA] Avoid some DAG combines for vector shifts
[llvm-complete.git] / tools / llvm-pdbutil / MinimalTypeDumper.h
blob0374e042e423269ddec0dc989a58b55d9424e2c1
1 //===- MinimalTypeDumper.h ------------------------------------ *- C++ --*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_TOOLS_LLVMPDBUTIL_MINIMAL_TYPE_DUMPER_H
10 #define LLVM_TOOLS_LLVMPDBUTIL_MINIMAL_TYPE_DUMPER_H
12 #include "llvm/DebugInfo/CodeView/TypeVisitorCallbacks.h"
13 #include "llvm/Support/BinaryStreamArray.h"
15 namespace llvm {
16 namespace codeview {
17 class LazyRandomTypeCollection;
20 namespace pdb {
21 class LinePrinter;
22 class TpiStream;
24 class MinimalTypeDumpVisitor : public codeview::TypeVisitorCallbacks {
25 public:
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 pdb::TpiStream *Stream)
31 : P(P), Width(Width), RecordBytes(RecordBytes), Hashes(Hashes),
32 Types(Types), NumHashBuckets(NumHashBuckets), HashValues(HashValues),
33 Stream(Stream) {}
35 Error visitTypeBegin(codeview::CVType &Record,
36 codeview::TypeIndex Index) override;
37 Error visitTypeEnd(codeview::CVType &Record) override;
38 Error visitMemberBegin(codeview::CVMemberRecord &Record) override;
39 Error visitMemberEnd(codeview::CVMemberRecord &Record) override;
41 #define TYPE_RECORD(EnumName, EnumVal, Name) \
42 Error visitKnownRecord(codeview::CVType &CVR, \
43 codeview::Name##Record &Record) override;
44 #define MEMBER_RECORD(EnumName, EnumVal, Name) \
45 Error visitKnownMember(codeview::CVMemberRecord &CVR, \
46 codeview::Name##Record &Record) override;
47 #define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
48 #define MEMBER_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
49 #include "llvm/DebugInfo/CodeView/CodeViewTypes.def"
51 private:
52 StringRef getTypeName(codeview::TypeIndex TI) const;
54 LinePrinter &P;
55 uint32_t Width;
56 bool RecordBytes = false;
57 bool Hashes = false;
58 codeview::LazyRandomTypeCollection &Types;
59 uint32_t NumHashBuckets;
60 codeview::TypeIndex CurrentTypeIndex;
61 FixedStreamArray<support::ulittle32_t> HashValues;
62 pdb::TpiStream *Stream = nullptr;
64 } // namespace pdb
65 } // namespace llvm
67 #endif