LLVM API Documentation

raw_os_ostream.cpp
Go to the documentation of this file.
00001 //===--- raw_os_ostream.cpp - Implement the raw_os_ostream class ----------===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // This implements support adapting raw_ostream to std::ostream.
00011 //
00012 //===----------------------------------------------------------------------===//
00013 
00014 #include "llvm/Support/raw_os_ostream.h"
00015 #include <ostream>
00016 using namespace llvm;
00017 
00018 //===----------------------------------------------------------------------===//
00019 //  raw_os_ostream
00020 //===----------------------------------------------------------------------===//
00021 
00022 raw_os_ostream::~raw_os_ostream() {
00023   flush();
00024 }
00025 
00026 void raw_os_ostream::write_impl(const char *Ptr, size_t Size) {
00027   OS.write(Ptr, Size);
00028 }
00029 
00030 uint64_t raw_os_ostream::current_pos() const { return OS.tellp(); }