formatted_raw_ostream: Fix a serious bug in tell().
authorDaniel Dunbar <daniel@zuster.org>
Fri, 14 Sep 2012 23:15:56 +0000 (23:15 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Fri, 14 Sep 2012 23:15:56 +0000 (23:15 +0000)
commit10097bd023acd750cff72a9f422608fce2ad81dd
tree48bba63f3baec422f07815e8fed2c67518743259
parentd426a642a23a234547cbc7061f5bfec157673249
formatted_raw_ostream: Fix a serious bug in tell().
 - The current_pos function is supposed to return all the written bytes, not the
   current position of the underlying stream.
 - This caused tell() to be broken whenever the underlying stream had buffered
   content.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163948 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/FormattedStream.h
unittests/Support/CMakeLists.txt
unittests/Support/formatted_raw_ostream_test.cpp [new file with mode: 0644]