#
bc96fe72 |
| 18-Aug-2009 |
Daniel Dunbar <daniel@zuster.org> |
Speed up raw_ostream::<<(unsigned long long) for 32-bit systems by doing most div/mods in 32-bits.
llvm-svn: 79375
|
#
23f90c1d |
| 18-Aug-2009 |
Dan Gohman <gohman@apple.com> |
Fix a bug in raw_ostream::write(char) introduced by the change to allow underlying stream classes to decline buffering. After calling SetBuffered(), re-check whether the stream is Unbuffered in order
Fix a bug in raw_ostream::write(char) introduced by the change to allow underlying stream classes to decline buffering. After calling SetBuffered(), re-check whether the stream is Unbuffered in order to handle the case where the underlying stream has declined buffering.
llvm-svn: 79362
show more ...
|
#
d882f4b6 |
| 18-Aug-2009 |
Daniel Dunbar <daniel@zuster.org> |
Revert r78924, disabling buffering defeats all the fast paths in raw_ostream.
llvm-svn: 79361
|
#
b20757bd |
| 15-Aug-2009 |
Dan Gohman <gohman@apple.com> |
Mingw also doesn't have st_blksize.
llvm-svn: 79142
|
#
17710227 |
| 15-Aug-2009 |
Dan Gohman <gohman@apple.com> |
Always check to see if raw_fd_ostream's file descriptor is attached to a terminal, not just when it's STDOUT_FILENO.
llvm-svn: 79066
|
#
4af229e0 |
| 13-Aug-2009 |
Dan Gohman <gohman@apple.com> |
When standard output is a terminal, set outs() to be unbuffered, to mimic the behavior of stdtout, which is line-buffered when the output is a terminal. This fixes some issues with bugpoint output ap
When standard output is a terminal, set outs() to be unbuffered, to mimic the behavior of stdtout, which is line-buffered when the output is a terminal. This fixes some issues with bugpoint output appearing being printed out of order.
llvm-svn: 78953
show more ...
|
#
c04a00a0 |
| 13-Aug-2009 |
Dan Gohman <gohman@apple.com> |
Fix a compiler warning about comparing signed with unsigned.
llvm-svn: 78933
|
#
98205555 |
| 13-Aug-2009 |
Dan Gohman <gohman@apple.com> |
Add an assert to check copy_to_buffer's precondition.
llvm-svn: 78926
|
#
854ea3c5 |
| 13-Aug-2009 |
Dan Gohman <gohman@apple.com> |
Set raw_os_ostream, raw_string_ostream, and raw_svector_ostream to be unbuffered. std::ostream does its own buffering, and std::string and SmallVector both have allocation strategies intended to hand
Set raw_os_ostream, raw_string_ostream, and raw_svector_ostream to be unbuffered. std::ostream does its own buffering, and std::string and SmallVector both have allocation strategies intended to handle frequent appending.
llvm-svn: 78924
show more ...
|
#
84487b98 |
| 13-Aug-2009 |
Dan Gohman <gohman@apple.com> |
Add support to raw_ostream for sizing the buffer according to the needs of the underlying output mechanism. raw_fd_ostream now uses st_blksize from fstat to determine a buffer size.
llvm-svn: 78923
|
#
54401d41 |
| 13-Aug-2009 |
Dan Gohman <gohman@apple.com> |
Move SetBufferSize and SetUnbuffered out of line.
llvm-svn: 78909
|
#
52022c23 |
| 13-Aug-2009 |
Dan Gohman <gohman@apple.com> |
Fix the buffer handling logic so that write_impl is always called with a full buffer, rather than often being called with a slightly-less-than-full buffer.
llvm-svn: 78907
|
#
6c9629b9 |
| 30-Jul-2009 |
Daniel Dunbar <daniel@zuster.org> |
Add raw_ostream::write_hex
llvm-svn: 77614
|
#
59a60c57 |
| 29-Jul-2009 |
Daniel Dunbar <daniel@zuster.org> |
Perform simplification noticed by Reid.
llvm-svn: 77477
|
#
a94f58ae |
| 29-Jul-2009 |
Daniel Dunbar <daniel@zuster.org> |
raw_ostream: Follow the 32-bit path when printing "small" decimal numbers.
llvm-svn: 77444
|
#
4b66b47a |
| 27-Jul-2009 |
Dan Gohman <gohman@apple.com> |
Make raw_null_ostream flush its buffer in its destructor, so that it conforms to the assertion added in r77245. This fixes a failure in qa_override.c in clang's testsuite.
llvm-svn: 77255
|
#
1b763293 |
| 27-Jul-2009 |
Dan Gohman <gohman@apple.com> |
Add an assertion check to raw_ostream's destructor to verify that the subclass hasn't left any pending data in the buffer.
llvm-svn: 77245
|
#
95a551ad |
| 16-Jul-2009 |
Daniel Dunbar <daniel@zuster.org> |
Add raw_null_ostream and llvm::nulls(), a raw_ostream that discards output. - No functionality change.
llvm-svn: 76103
|
#
f199ad6e |
| 16-Jul-2009 |
Dan Gohman <gohman@apple.com> |
Use size_t.
llvm-svn: 76069
|
#
58fcef91 |
| 15-Jul-2009 |
Dan Gohman <gohman@apple.com> |
Change raw_ostream so that it doesn't call llvm_report_error immediately on every output error. Instead, add a flag to raw_ostream, and set the flag whenever an error is detected.
The flag can be qu
Change raw_ostream so that it doesn't call llvm_report_error immediately on every output error. Instead, add a flag to raw_ostream, and set the flag whenever an error is detected.
The flag can be queried and cleared from the public API. This gives applications more flexibility to handling errors in application-specific ways.
If the flag is not cleared when the raw_ostream is destructed, llvm_report_error is called from the destructor. This ensures that errors are not implicitly silenced, and provides convenient default behavior for tools like llc and opt. Clients wishing to avoid llvm_report_error calls from raw_ostream should check for errors and clear the error flag.
llvm-svn: 75857
show more ...
|
#
607818a2 |
| 15-Jul-2009 |
Dan Gohman <gohman@apple.com> |
Add a Force option to raw_fd_ostream to specify whether opening an existing file is considered an error. Convert several tools to use raw_fd_ostream instead of std::ostream, and to use this new optio
Add a Force option to raw_fd_ostream to specify whether opening an existing file is considered an error. Convert several tools to use raw_fd_ostream instead of std::ostream, and to use this new option instead of doing a manual check.
llvm-svn: 75801
show more ...
|
#
213e87b1 |
| 15-Jul-2009 |
Dan Gohman <gohman@apple.com> |
Check for errors on close(2) too. And lseek(2).
llvm-svn: 75793
|
#
33fb6408 |
| 15-Jul-2009 |
Dan Gohman <gohman@apple.com> |
Use 0664 instead of 0644 for the default open mode. This is consistent with common std::ostream implmentations, and it gives the user the option of using the umask group write bit.
llvm-svn: 75792
|
#
dcb50b9b |
| 15-Jul-2009 |
Daniel Dunbar <daniel@zuster.org> |
Detect write failures on raw_fd_ostream.
llvm-svn: 75758
|
#
a31f96cf |
| 14-Jul-2009 |
David Greene <greened@obbligato.org> |
Have asm printers use formatted_raw_ostream directly to avoid a dynamic_cast<>.
llvm-svn: 75670
|