LLVM: include/llvm/Support/FormatCommon.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9#ifndef LLVM_SUPPORT_FORMATCOMMON_H
10#define LLVM_SUPPORT_FORMATCOMMON_H
11
15
16namespace llvm {
18
19
20
26
30
32
33
34
35
36
39 return;
40 }
43
46 S << Item;
47 return;
48 }
49
50 unsigned PadAmount = Width - static_cast<unsigned>(Item.size());
53 S << Item;
54 fill(S, PadAmount);
55 break;
57 unsigned X = PadAmount / 2;
58 fill(S, X);
59 S << Item;
60 fill(S, PadAmount - X);
61 break;
62 }
63 default:
64 fill(S, PadAmount);
65 S << Item;
66 break;
67 }
68 }
69
70private:
72 for (unsigned I = 0; I < Count; ++I)
74 }
75};
76}
77
78#endif
This file defines the SmallString class.
static TableGen::Emitter::OptClass< SkeletonEmitter > X("gen-skeleton-class", "Generate example skeleton class")
SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...
StringRef - Represent a constant reference to a string, i.e.
This class implements an extremely fast bulk output stream that can only output to a stream.
A raw_ostream that writes to an SmallVector or SmallString.
This is an optimization pass for GlobalISel generic memory operations.
void fill(R &&Range, T &&Value)
Provide wrappers to std::fill which take ranges instead of having to pass begin/end explicitly.
AlignStyle
Definition FormatCommon.h:17
@ Center
Definition FormatCommon.h:17
@ Right
Definition FormatCommon.h:17
@ Left
Definition FormatCommon.h:17
FunctionAddr VTableAddr Count
void format(raw_ostream &S, StringRef Options)
Definition FormatCommon.h:31
FmtAlign(support::detail::format_adapter &Adapter, AlignStyle Where, unsigned Width, char Fill=' ')
Definition FormatCommon.h:27
char Fill
Definition FormatCommon.h:25
support::detail::format_adapter & Adapter
Definition FormatCommon.h:22
AlignStyle Where
Definition FormatCommon.h:23
unsigned Width
Definition FormatCommon.h:24