14#ifndef LLVM_SUPPORT_FORMATTEDSTREAM_H 
   15#define LLVM_SUPPORT_FORMATTEDSTREAM_H 
   41  std::pair<unsigned, unsigned> Position;
 
   60  void write_impl(
const char *
Ptr, 
size_t Size) 
override;
 
   64  uint64_t current_pos()
 const override {
 
   68    return TheStream->tell();
 
   75  void ComputePosition(
const char *
Ptr, 
size_t size);
 
   80  void UpdatePosition(
const char *
Ptr, 
size_t Size);
 
   91    if (
size_t BufferSize = TheStream->GetBufferSize())
 
   95    TheStream->SetUnbuffered();
 
  102  void PreDisableScan() {
 
  105    assert(PartialUTF8Char.empty());
 
  109  void PostDisableScan() {
 
  115  struct DisableScanScope {
 
  121    ~DisableScanScope() { S->PostDisableScan(); }
 
  136      : TheStream(nullptr), Position(0, 0), DisableScan(
false) {
 
 
  140      : TheStream(nullptr), Position(0, 0), Scanned(nullptr),
 
  141        DisableScan(
false) {}
 
 
  158    return Position.first;
 
 
  164    return Position.second;
 
 
  169      DisableScanScope S(
this);
 
 
  177      DisableScanScope S(
this);
 
 
  184                           bool BG = 
false)
 override {
 
  186      DisableScanScope S(
this);
 
 
  193    return TheStream->is_displayed();
 
 
  197  void releaseStream() {
 
  202    if (
size_t BufferSize = GetBufferSize())
 
  203      TheStream->SetBufferSize(BufferSize);
 
  205      TheStream->SetUnbuffered();
 
 
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file defines the SmallString class.
SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...
raw_ostream(bool unbuffered=false, OStreamKind K=OStreamKind::OK_OStream)
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.
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.
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.
LLVM_ABI formatted_raw_ostream & fdbgs()
fdbgs() - This returns a reference to a formatted_raw_ostream for debug output.
LLVM_ABI formatted_raw_ostream & fouts()
fouts() - This returns a reference to a formatted_raw_ostream for standard output.
LLVM_ABI formatted_raw_ostream & ferrs()
ferrs() - This returns a reference to a formatted_raw_ostream for standard error.