15 #ifndef LLVM_SUPPORT_FORMATTEDSTREAM_H
16 #define LLVM_SUPPORT_FORMATTEDSTREAM_H
37 std::pair<unsigned, unsigned> Position;
44 void write_impl(
const char *
Ptr,
size_t Size)
override;
48 uint64_t current_pos()
const override {
52 return TheStream->
tell();
58 void ComputePosition(
const char *Ptr,
size_t size);
90 : TheStream(nullptr), Position(0, 0) {
113 unsigned getLine() {
return Position.second; }
135 void releaseStream() {
149 formatted_raw_ostream &
fouts();
153 formatted_raw_ostream &
ferrs();
157 formatted_raw_ostream &
fdbgs();
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. ...
uint64_t tell() const
tell - Return the current offset with the file.
virtual bool is_displayed() const
This function determines if this stream is connected to a "tty" or "console" window.
void SetUnbuffered()
Set the stream to be unbuffered.
virtual raw_ostream & reverseColor()
Reverses the foreground and background colors.
void SetBufferSize(size_t Size)
Set the stream to be buffered, using the specified buffer size.
size_t GetBufferSize() const
Color
A "color", which is either even or odd.
formatted_raw_ostream & fdbgs()
fdbgs() - This returns a reference to a formatted_raw_ostream for debug output.
formatted_raw_ostream & ferrs()
ferrs() - This returns a reference to a formatted_raw_ostream for standard error. ...
virtual raw_ostream & resetColor()
Resets the colors to terminal defaults.
This class implements an extremely fast bulk output stream that can only output to a stream...
formatted_raw_ostream & fouts()
fouts() - This returns a reference to a formatted_raw_ostream for standard output.