Michael J. Spencer
1d2d12deb1
Properly test the LLVM_USE_RVALUE_REFERENCES macro.
...
llvm-svn: 161978
2012-08-15 19:16:27 +00:00
Michael J. Spencer
ef2284fbad
[PathV2] Add mapped_file_region. Implementation for Windows and POSIX.
...
llvm-svn: 161976
2012-08-15 19:05:47 +00:00
Francois Pichet
5dc987a3d1
Unbreak the MSVC build: add return to unimplemented functions.
...
llvm-svn: 158788
2012-06-20 04:08:49 +00:00
Nick Kledzik
18497e9242
Add permissions(), map_file_pages(), and unmap_file_pages() to llvm::sys::fs and add unit test. Unix is implemented. Windows side needs to be implemented.
...
llvm-svn: 158770
2012-06-20 00:28:54 +00:00
Eric Christopher
b6148ed72c
Allow unique_file to take a mode for file permissions, but default
...
to user only read/write.
Part of rdar://11325849
llvm-svn: 156591
2012-05-11 00:07:44 +00:00
NAKAMURA Takumi
3b7f995b75
Windows/PathV2.inc: Retry rename() for (maximum) 2 seconds.
...
Files might be opend by system scanners (eg. file indexer, virus scanner, &c).
llvm-svn: 156380
2012-05-08 14:31:46 +00:00
David Blaikie
18544b9614
Change default error_code ctor to a 'named ctor' so it's more self-documenting.
...
Unify default construction of error_code uses on this idiom so that users don't
feel compelled to make static globals for naming convenience. (unfortunately I
couldn't make the original ctor private as some APIs don't return their result,
instead using an out parameter (that makes sense to default construct) - which
is a bit of a pity. I did, however, find/fix some cases of unnecessary default
construction of error_code before I hit the unfixable cases)
llvm-svn: 150197
2012-02-09 19:24:12 +00:00
Chad Rosier
531042840d
Revert r146363 to allow buildbots to make forward progress.
...
Original commit message:
Support/FileSystem: Implement canonicalize.
llvm-svn: 146378
2011-12-12 17:58:31 +00:00
Michael J. Spencer
203d7807a8
Support/FileSystem: Implement bool equivalent(file_status A, file_status B);
...
llvm-svn: 146364
2011-12-12 06:04:28 +00:00
Michael J. Spencer
32ef4d2e1b
Support/FileSystem: Implement canonicalize.
...
llvm-svn: 146363
2011-12-12 06:04:01 +00:00
Michael J. Spencer
513f1b666f
Support/Windows: Cleanup scoped handles.
...
llvm-svn: 146362
2011-12-12 06:03:33 +00:00
Michael J. Spencer
0a7625d661
Support/FileSystem: Implement recursive_directory_iterator and make
...
directory_iterator preserve InputIterator semantics on copy.
llvm-svn: 146200
2011-12-08 22:50:09 +00:00
Benjamin Kramer
58994ec9b9
PathV2: Handle more reserved filenames on windows.
...
Patch by Aaron Ballman!
llvm-svn: 138213
2011-08-20 21:36:38 +00:00
Argyrios Kyrtzidis
348937de07
Add an optional 'bool makeAbsolute' in llvm::sys::fs::unique_file function.
...
If true and 'model' parameter is not an absolute path, a temp directory will be prepended.
Make it true by default to match current behaviour.
llvm-svn: 136310
2011-07-28 00:29:20 +00:00
NAKAMURA Takumi
a3d4749e24
Windows/PathV2.inc: [PR8520] Recognize "NUL" as special (character) file.
...
FIXME: It is a temporal hack. We should detect as many "special file name" as possible.
llvm-svn: 127724
2011-03-16 02:53:32 +00:00
NAKAMURA Takumi
3e76b502a4
Windows/PathV2.inc: Eliminate redundant condition. DWORD is unsigned.
...
llvm-svn: 127140
2011-03-07 00:12:53 +00:00
NAKAMURA Takumi
5a3ff5b5a0
Make Win32's header file name lower for cross build on case-sensitive filesystem.
...
llvm-svn: 124864
2011-02-04 12:53:04 +00:00
NAKAMURA Takumi
8a07451a6e
Windows/PathV2.inc: For CryptAcquireContext(), CRYPT_VERIFYCONTEXT may be specified for easy use.
...
llvm-svn: 123687
2011-01-17 22:41:34 +00:00
NAKAMURA Takumi
53f893af54
Windows/PathV2.inc: MoveFileEx() can behave like Posix's mv(1) to specify MOVEFILE_COPY_ALLOWED | MOVEFILE_REPLACE_EXISTING.
...
llvm-svn: 123686
2011-01-17 22:41:25 +00:00
Michael J. Spencer
ee1699c362
Support/PathV2: Implement get_magic.
...
llvm-svn: 123544
2011-01-15 18:52:33 +00:00
Michael J. Spencer
98879d7641
Support/Windows/PathV2: Make directory iteration ignore . and ..
...
llvm-svn: 122883
2011-01-05 16:39:30 +00:00
Michael J. Spencer
153749b30b
Support/Windows/PathV2: Fix remove to handle both files and directories.
...
llvm-svn: 122882
2011-01-05 16:39:22 +00:00
Benjamin Kramer
cb520cd8cb
Missed some StringRefRefs.
...
llvm-svn: 122077
2010-12-17 18:59:09 +00:00
Michael J. Spencer
ae7de7e2f9
Support/Windows/PathV2: Fix header comment.
...
llvm-svn: 121383
2010-12-09 17:37:42 +00:00
Michael J. Spencer
751e9aafa9
Support: Move c_str from SmallVector back to SmallString and add a free standing
...
templated c_str in Windows.h to replace it.
llvm-svn: 121381
2010-12-09 17:37:18 +00:00
Michael J. Spencer
f616b218c8
Support/PathV2: Change most functions in the path namespace to return their work
...
via their return value instead of an out parameter.
llvm-svn: 121149
2010-12-07 17:04:04 +00:00
Michael J. Spencer
1e090f0b8f
Support/PathV2: Remove the error_code return type from all functions in the path
...
namespace. None of them return anything except for success anyway. These will be
converted to returning their result soon.
llvm-svn: 121109
2010-12-07 03:57:37 +00:00
Michael J. Spencer
20daa28344
Support/PathV2: Move current_path from path to fs and fix the Unix implementation.
...
Unix bug spotted by Dan Gohman.
llvm-svn: 121090
2010-12-07 01:22:31 +00:00
Michael J. Spencer
0d025b6b42
Support/Windows: Make MinGW happy.
...
llvm-svn: 120991
2010-12-06 06:02:07 +00:00
Michael J. Spencer
7ecd94cc0b
Support/FileSystem: Add directory_iterator implementation.
...
llvm-svn: 120989
2010-12-06 04:28:42 +00:00
Michael J. Spencer
39c4621f42
Support/Windows: Add ScopedHandle and move some clients over to it.
...
llvm-svn: 120987
2010-12-06 04:28:13 +00:00
Michael J. Spencer
66a1f86f7a
Support/PathV2: Remove redundant calls to make_error_code.
...
llvm-svn: 120913
2010-12-04 18:45:32 +00:00
Michael J. Spencer
db5576a185
Support/FileSystem: Add status implementation.
...
llvm-svn: 120870
2010-12-04 00:32:40 +00:00
Michael J. Spencer
962fbc42b5
Support/Windows/FileSystem: Fix MinGW warnings.
...
llvm-svn: 120868
2010-12-04 00:32:14 +00:00
Michael J. Spencer
818ab4aad4
Support/FileSystem: Add file_size implementation.
...
llvm-svn: 120867
2010-12-04 00:31:48 +00:00
Michael J. Spencer
376d38753d
Support/FileSystem: Add equivalent implementation.
...
llvm-svn: 120827
2010-12-03 18:49:13 +00:00
Michael J. Spencer
ca242f2c36
Support/FileSystem: Fix MinGW build. It doesn't have _chsize_s.
...
llvm-svn: 120826
2010-12-03 18:48:56 +00:00
Michael J. Spencer
521c321d7c
And I really hate line endings.
...
llvm-svn: 120821
2010-12-03 18:04:11 +00:00
Michael J. Spencer
6025247132
Support/Windows/FileSystem: Fix MinGW build.
...
llvm-svn: 120820
2010-12-03 18:03:28 +00:00
Michael J. Spencer
c20a0325f3
Support/FileSystem: Add resize_file implementation.
...
llvm-svn: 120819
2010-12-03 17:54:07 +00:00
Michael J. Spencer
409f556a2f
Support/FileSystem: Add rename implementation.
...
llvm-svn: 120818
2010-12-03 17:53:55 +00:00
Michael J. Spencer
6e74e11c85
Support/FileSystem: Add remove implementation.
...
llvm-svn: 120817
2010-12-03 17:53:43 +00:00
Michael J. Spencer
772caff532
Fix line endings.
...
llvm-svn: 120816
2010-12-03 17:53:23 +00:00
Michael J. Spencer
7ee6d5d6a1
Support/FileSystem: Add create_symlink implementation.
...
llvm-svn: 120800
2010-12-03 07:41:25 +00:00
Michael J. Spencer
e0c4560b50
Support/FileSystem: Add create_hard_link implementation.
...
llvm-svn: 120792
2010-12-03 05:58:41 +00:00
Michael J. Spencer
31e310cda0
Support/FileSystem: Add create_director{y,ies} implementations.
...
llvm-svn: 120790
2010-12-03 05:42:11 +00:00
Michael J. Spencer
a41772aa0f
Support/Windows/FileSystem: Remove unneeded toNullTerminatedStringRef.
...
llvm-svn: 120777
2010-12-03 01:21:38 +00:00
Michael J. Spencer
4571040ea1
Support/FileSystem: Add unique_file and exists implementations.
...
llvm-svn: 120776
2010-12-03 01:21:28 +00:00
Michael J. Spencer
795adf5061
Support/FileSystem: Fix copy_file implementation to use toNullTerminatedStringRef
...
instead of toStringRef. The file system APIs need c strings.
llvm-svn: 120601
2010-12-01 20:37:42 +00:00
Michael J. Spencer
9fc1d9dcc3
Support/FileSystem: Add copy_file implementation. Not tests yet because the
...
file creation APIs aren't implemented.
llvm-svn: 120593
2010-12-01 19:32:01 +00:00