[llvm-commits] [llvm] r79385 - in /llvm/trunk: include/llvm/Support/raw_ostream.h lib/Support/raw_ostream.cpp

Daniel Dunbar daniel at zuster.org
Tue Aug 18 17:14:25 PDT 2009


Author: ddunbar
Date: Tue Aug 18 19:14:25 2009
New Revision: 79385

URL: http://llvm.org/viewvc/llvm-project?rev=79385&view=rev
Log:
raw_ostream: Remove pointless redefinitions of tell().
 - The base class implementation is correct.

Modified:
    llvm/trunk/include/llvm/Support/raw_ostream.h
    llvm/trunk/lib/Support/raw_ostream.cpp

Modified: llvm/trunk/include/llvm/Support/raw_ostream.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/raw_ostream.h?rev=79385&r1=79384&r2=79385&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Support/raw_ostream.h (original)
+++ llvm/trunk/include/llvm/Support/raw_ostream.h Tue Aug 18 19:14:25 2009
@@ -355,9 +355,6 @@
   /// close - Manually flush the stream and close the file.
   void close();
 
-  /// tell - Return the current offset with the file.
-  uint64_t tell() { return pos + GetNumBytesInBuffer(); }
-
   /// seek - Flushes the stream and repositions the underlying file descriptor
   ///  positition to the offset specified from the beginning of the file.
   uint64_t seek(uint64_t off);
@@ -417,9 +414,6 @@
 public:
   raw_os_ostream(std::ostream &O) : OS(O) {}
   ~raw_os_ostream();
-
-  /// tell - Return the current offset with the stream.
-  uint64_t tell();
 };
 
 /// raw_string_ostream - A raw_ostream that writes to an std::string.  This is a
@@ -437,9 +431,6 @@
   explicit raw_string_ostream(std::string &O) : OS(O) {}
   ~raw_string_ostream();
 
-  /// tell - Return the current offset with the stream.
-  uint64_t tell() { return OS.size() + GetNumBytesInBuffer(); }
-
   /// str - Flushes the stream contents to the target string and returns
   ///  the string's reference.
   std::string& str() {
@@ -463,9 +454,6 @@
 public:
   explicit raw_svector_ostream(SmallVectorImpl<char> &O);
   ~raw_svector_ostream();
-
-  /// tell - Return the current offset with the stream.
-  uint64_t tell();
 };
 
 /// raw_null_ostream - A raw_ostream that discards all output.

Modified: llvm/trunk/lib/Support/raw_ostream.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/raw_ostream.cpp?rev=79385&r1=79384&r2=79385&view=diff

==============================================================================
--- llvm/trunk/lib/Support/raw_ostream.cpp (original)
+++ llvm/trunk/lib/Support/raw_ostream.cpp Tue Aug 18 19:14:25 2009
@@ -477,10 +477,6 @@
 
 uint64_t raw_os_ostream::current_pos() { return OS.tellp(); }
 
-uint64_t raw_os_ostream::tell() { 
-  return (uint64_t)OS.tellp() + GetNumBytesInBuffer(); 
-}
-
 //===----------------------------------------------------------------------===//
 //  raw_string_ostream
 //===----------------------------------------------------------------------===//
@@ -510,10 +506,6 @@
 
 uint64_t raw_svector_ostream::current_pos() { return OS.size(); }
 
-uint64_t raw_svector_ostream::tell() { 
-  return OS.size() + GetNumBytesInBuffer(); 
-}
-
 //===----------------------------------------------------------------------===//
 //  raw_null_ostream
 //===----------------------------------------------------------------------===//





More information about the llvm-commits mailing list