14#ifndef LLVM_SUPPORT_FORMATTEDSTREAM_H
15#define LLVM_SUPPORT_FORMATTEDSTREAM_H
40 std::pair<unsigned, unsigned> Position;
55 void write_impl(
const char *
Ptr,
size_t Size)
override;
59 uint64_t current_pos()
const override {
63 return TheStream->
tell();
70 void ComputePosition(
const char *
Ptr,
size_t size);
75 void UpdatePosition(
const char *
Ptr,
size_t Size);
107 : TheStream(nullptr), Position(0, 0) {
129 return Position.first;
135 return Position.second;
158 void releaseStream() {
172formatted_raw_ostream &
fouts();
176formatted_raw_ostream &
ferrs();
180formatted_raw_ostream &
fdbgs();
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.
size_t GetNumBytesInBuffer() 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.