14#ifndef LLVM_SUPPORT_FORMATTEDSTREAM_H
15#define LLVM_SUPPORT_FORMATTEDSTREAM_H
40 std::pair<unsigned, unsigned> Position;
59 void write_impl(
const char *
Ptr,
size_t Size)
override;
63 uint64_t current_pos()
const override {
67 return TheStream->
tell();
74 void ComputePosition(
const char *
Ptr,
size_t size);
79 void UpdatePosition(
const char *
Ptr,
size_t Size);
101 void PreDisableScan() {
108 void PostDisableScan() {
114 struct DisableScanScope {
120 ~DisableScanScope() { S->PostDisableScan(); }
135 : TheStream(nullptr), Position(0, 0), DisableScan(
false) {
139 : TheStream(nullptr), Position(0, 0), Scanned(nullptr),
140 DisableScan(
false) {}
157 return Position.first;
163 return Position.second;
168 DisableScanScope S(
this);
176 DisableScanScope S(
this);
184 DisableScanScope S(
this);
195 void releaseStream() {
209formatted_raw_ostream &
fouts();
213formatted_raw_ostream &
ferrs();
217formatted_raw_ostream &
fdbgs();
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file defines the SmallString class.
SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...
This class implements an extremely fast bulk output stream that can only output to a stream.
uint64_t tell() const
tell - Return the current offset with the file.
void SetBufferSize(size_t Size)
Set the stream to be buffered, using the specified buffer size.
virtual raw_ostream & changeColor(enum Colors Color, bool Bold=false, bool BG=false)
Changes the foreground color of text that will be output from this point forward.
size_t GetBufferSize() const
virtual raw_ostream & resetColor()
Resets the colors to terminal defaults.
virtual raw_ostream & reverseColor()
Reverses the foreground and background colors.
void SetUnbuffered()
Set the stream to be unbuffered.
virtual bool is_displayed() const
This function determines if this stream is connected to a "tty" or "console" window.
const char * getBufferStart() const
Return the beginning of the current stream buffer, or 0 if the stream is unbuffered.
virtual void enable_colors(bool enable)
size_t GetNumBytesInBuffer() const
bool colors_enabled() const
This is an optimization pass for GlobalISel generic memory operations.
auto size(R &&Range, std::enable_if_t< std::is_base_of< std::random_access_iterator_tag, typename std::iterator_traits< decltype(Range.begin())>::iterator_category >::value, void > *=nullptr)
Get the size of a range.
formatted_raw_ostream & fdbgs()
fdbgs() - This returns a reference to a formatted_raw_ostream for debug output.
formatted_raw_ostream & fouts()
fouts() - This returns a reference to a formatted_raw_ostream for standard output.
formatted_raw_ostream & ferrs()
ferrs() - This returns a reference to a formatted_raw_ostream for standard error.