Commit Graph

8 Commits

Author SHA1 Message Date
Ahmed Charles fba066461f [C++11] Add overloads for externally used OwningPtr functions.
This will allow external callers of these functions to switch over time
rather than forcing a breaking change all a once. These particular
functions were determined by building clang/lld/lldb.

llvm-svn: 202959
2014-03-05 10:27:34 +00:00
Rafael Espindola 81e7fd011f Use the simpler version of sys::fs::remove when possible.
llvm-svn: 198958
2014-01-10 21:40:29 +00:00
Rafael Espindola 9a7801566f Create files with the correct permission instead of changing it afterwards.
Not intended functionality change.

llvm-svn: 185830
2013-07-08 15:22:09 +00:00
Rafael Espindola c9d2e5b8ca Add a createUniqueFile function and switch llvm's users of unique_file.
This function is complementary to createTemporaryFile. It handles the case were
the unique file is *not* temporary: we will rename it in the end. Since we
will rename it, the file has to be in the same filesystem as the final
destination and we don't prepend the system temporary directory.

This has a small semantic difference from unique_file: the default mode is 0666.
This matches the behavior of most unix tools. For example, with this change
lld now produces files with the same permissions as ld. I will add a test
of this change when I port clang over to createUniqueFile (next commit).

llvm-svn: 185726
2013-07-05 21:01:08 +00:00
Michael J. Spencer 42ad29fa05 [Support] Fix lifetime of file descriptors when using MemoryBuffer.
Clients of MemoryBuffer::getOpenFile expect it not to take ownership of the file
descriptor passed in. So don't.

llvm-svn: 176995
2013-03-14 00:20:10 +00:00
Michael J. Spencer 7fe24f5744 [Support] Make FileOutputBuffer work on Windows.
llvm-svn: 169167
2012-12-03 22:09:52 +00:00
Chandler Carruth ed0881b2a6 Use the new script to sort the includes of every file under lib.
Sooooo many of these had incorrect or strange main module includes.
I have manually inspected all of these, and fixed the main module
include to be the nearest plausible thing I could find. If you own or
care about any of these source files, I encourage you to take some time
and check that these edits were sensible. I can't have broken anything
(I strictly added headers, and reordered them, never removed), but they
may not be the headers you'd really like to identify as containing the
API being implemented.

Many forward declarations and missing includes were added to a header
files to allow them to parse cleanly when included first. The main
module rule does in fact have its merits. =]

llvm-svn: 169131
2012-12-03 16:50:05 +00:00
Nick Kledzik 5fce8c4ffe Initial commit of new FileOutputBuffer support class.
Since the llvm::sys::fs::map_file_pages() support function it relies on
is not yet implemented on Windows, the unit tests for FileOutputBuffer 
are currently conditionalized to run only on unix.

llvm-svn: 161099
2012-08-01 02:29:50 +00:00