LLVM: include/llvm/DebugInfo/PDB/Native/LinePrinter.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9#ifndef LLVM_DEBUGINFO_PDB_NATIVE_LINEPRINTER_H
10#define LLVM_DEBUGINFO_PDB_NATIVE_LINEPRINTER_H
11
21
22#include
23
24
40
41namespace llvm {
42namespace msf {
43class MSFStreamLayout;
44}
45namespace pdb {
46
50
53
54public:
57
61
64 template <typename... Ts> void formatLine(const char *Fmt, Ts &&...Items) {
66 }
67 template <typename... Ts> void format(const char *Fmt, Ts &&...Items) {
68 print(formatv(Fmt, std::forward(Items)...));
69 }
70
75
84
85 bool hasColor() const { return UseColor; }
88
93
95
96private:
97 template
98 void SetFilters(std::list &List, Iter Begin, Iter End) {
100 for (; Begin != End; ++Begin)
102 }
103
105 int IndentSpaces;
106 int CurrentIndent;
109
110 std::list ExcludeCompilandFilters;
111 std::list ExcludeTypeFilters;
112 std::list ExcludeSymbolFilters;
113
114 std::list IncludeCompilandFilters;
115 std::list IncludeTypeFilters;
116 std::list IncludeSymbolFilters;
117};
118
129
133
140 L = &Scope.P;
141 Amount = Scope.IndentLevel;
142 }
147
150};
151
152template
154 return Printer.getStream() << Item;
155}
156
171
173public:
176
178
179private:
183};
184}
185}
186
187#endif
dxil pretty DXIL Metadata Pretty Printer
static ManagedStatic< cl::opt< cl::boolOrDefault >, CreateUseColor > UseColor
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
StringRef - Represent a constant reference to a string, i.e.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Describes the layout of a stream in an MSF layout.
Definition LinePrinter.h:51
bool hasColor() const
Definition LinePrinter.h:85
LLVM_ABI void print(const Twine &T)
void format(const char *Fmt, Ts &&...Items)
Definition LinePrinter.h:67
LLVM_ABI void printLine(const Twine &T)
const FilterOptions & getFilters() const
Definition LinePrinter.h:94
LLVM_ABI void Unindent(uint32_t Amount=0)
LLVM_ABI void formatMsfStreamData(StringRef Label, PDBFile &File, uint32_t StreamIdx, StringRef StreamPurpose, uint64_t Offset, uint64_t Size)
int getIndentLevel() const
Definition LinePrinter.h:87
LLVM_ABI bool IsSymbolExcluded(llvm::StringRef SymbolName)
raw_ostream & getStream()
Definition LinePrinter.h:86
friend class WithColor
Definition LinePrinter.h:52
LLVM_ABI LinePrinter(int Indent, bool UseColor, raw_ostream &Stream, const FilterOptions &Filters)
LLVM_ABI void formatMsfStreamBlocks(PDBFile &File, const msf::MSFStreamLayout &Stream)
void formatLine(const char *Fmt, Ts &&...Items)
Definition LinePrinter.h:64
LLVM_ABI void formatBinary(StringRef Label, ArrayRef< uint8_t > Data, uint64_t StartOffset)
LLVM_ABI bool IsTypeExcluded(llvm::StringRef TypeName, uint64_t Size)
LLVM_ABI bool IsClassExcluded(const ClassLayout &Class)
LLVM_ABI bool IsCompilandExcluded(llvm::StringRef CompilandName)
LLVM_ABI void Indent(uint32_t Amount=0)
raw_ostream & get()
Definition LinePrinter.h:177
LLVM_ABI WithColor(LinePrinter &P, PDB_ColorItem C)
This class implements an extremely fast bulk output stream that can only output to a stream.
@ C
The default llvm calling convention, compatible with C.
PrintScope withLabelWidth(const PrintScope &Scope, uint32_t W)
Definition LinePrinter.h:130
raw_ostream & operator<<(LinePrinter &Printer, const T &Item)
Definition LinePrinter.h:153
PDB_ColorItem
Definition LinePrinter.h:157
@ Register
Definition LinePrinter.h:169
@ Comment
Definition LinePrinter.h:161
@ Keyword
Definition LinePrinter.h:163
@ Identifier
Definition LinePrinter.h:165
@ Padding
Definition LinePrinter.h:162
@ Path
Definition LinePrinter.h:166
@ LiteralValue
Definition LinePrinter.h:168
@ SectionHeader
Definition LinePrinter.h:167
@ Address
Definition LinePrinter.h:159
@ Offset
Definition LinePrinter.h:164
This is an optimization pass for GlobalISel generic memory operations.
auto formatv(bool Validate, const char *Fmt, Ts &&...Vals)
Definition LinePrinter.h:25
std::list< std::string > IncludeCompilands
Definition LinePrinter.h:31
std::optional< uint32_t > DumpModi
Definition LinePrinter.h:34
bool JustMyCode
Definition LinePrinter.h:38
std::list< std::string > IncludeTypes
Definition LinePrinter.h:29
std::list< std::string > IncludeSymbols
Definition LinePrinter.h:30
uint32_t SizeThreshold
Definition LinePrinter.h:33
std::list< std::string > ExcludeTypes
Definition LinePrinter.h:26
std::optional< uint32_t > SymbolOffset
Definition LinePrinter.h:37
std::optional< uint32_t > ChildrenRecurseDepth
Definition LinePrinter.h:36
uint32_t PaddingThreshold
Definition LinePrinter.h:32
std::list< std::string > ExcludeCompilands
Definition LinePrinter.h:28
std::optional< uint32_t > ParentRecurseDepth
Definition LinePrinter.h:35
std::list< std::string > ExcludeSymbols
Definition LinePrinter.h:27
AutoIndent(const PrintScope &Scope)
Definition LinePrinter.h:139
~AutoIndent()
Definition LinePrinter.h:143
uint32_t Amount
Definition LinePrinter.h:149
AutoIndent(LinePrinter &L, uint32_t Amount=0)
Definition LinePrinter.h:135
LinePrinter * L
Definition LinePrinter.h:148
Definition LinePrinter.h:119
PrintScope(const PrintScope &Other, uint32_t LabelWidth)
Definition LinePrinter.h:122
uint32_t LabelWidth
Definition LinePrinter.h:127
uint32_t IndentLevel
Definition LinePrinter.h:126
LinePrinter & P
Definition LinePrinter.h:125
PrintScope(LinePrinter &P, uint32_t IndentLevel)
Definition LinePrinter.h:120