summaryrefslogtreecommitdiff
path: root/lib/Support/PathV2.cpp
Commit message (Collapse)AuthorAge
* [Support][FileSystem] Fix identify_magic for big endian ELF.Michael J. Spencer2013-04-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178905 91177308-0d34-0410-b5e6-96231b3b80d8
* <rdar://problem/13477190> On Darwin, use DARWIN_USER_TEMP_DIR or ↵Douglas Gregor2013-03-21
| | | | | | | | | | | DARWIN_USER_CACHE_DIR for the system temporary directory. The DARWIN_USER_TEMP_DIR and DARWIN_USER_CACHE_DIR configuration settings are more idiomatic for Darwin than the TMPDIR environment variable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177669 91177308-0d34-0410-b5e6-96231b3b80d8
* Add static cast to unsigned char whenever a character classification ↵Guy Benyei2013-02-12
| | | | | | function is called with a signed char argument, in order to avoid assertions in Windows Debug configuration. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175006 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-03
| | | | | | | | | | | | | | | | | 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. =] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169131 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support/PathV2] Fix out of bounds access in identify_magic when the file is ↵Michael J. Spencer2012-06-19
| | | | | | empty. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158704 91177308-0d34-0410-b5e6-96231b3b80d8
* [PathV2]: Fix bug in create_directories which caused infinite recursion onMichael J. Spencer2012-03-21
| | | | | | | | som inputs. Bug found and fix proposed by Kal Conley! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153225 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Fix namespace qualifier in make_absolute(), for Win32.Daniel Dunbar2012-02-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151685 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Fix make_absolute() to match is_absolute() and not expect toDaniel Dunbar2012-02-29
| | | | | | | | | | find root names on Unix. - This fixes make_absolute to not basically always call current_path() on Unix systems. - I think the API probably needs cleanup in this area, but I'll let Michael handle that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151681 91177308-0d34-0410-b5e6-96231b3b80d8
* [PathV2] Fix bug in relative_path.Michael J. Spencer2012-02-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151675 91177308-0d34-0410-b5e6-96231b3b80d8
* Change default error_code ctor to a 'named ctor' so it's more self-documenting.David Blaikie2012-02-09
| | | | | | | | | | | 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) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150197 91177308-0d34-0410-b5e6-96231b3b80d8
* PathV2: Remove static StringRef ctors.Benjamin Kramer2012-02-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150071 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/FileSystem: Add file_magic and move a vew clients over to it.Michael J. Spencer2011-12-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146523 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup whitespace.Michael J. Spencer2011-12-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146521 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/Windows: Cleanup scoped handles.Michael J. Spencer2011-12-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146362 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a minor bug in fs::create_directories. Patch by Albert Wong.Eli Friedman2011-09-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139928 91177308-0d34-0410-b5e6-96231b3b80d8
* Update the comment for system_temp_directory() to indicate when itDouglas Gregor2011-09-14
| | | | | | | | will ignore the erasedOnReboot option, and properly escape the backslash in "C:\TEMP". Thanks to Aaron and Francois. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139755 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a simple routine to determine the typical system directory forDouglas Gregor2011-09-14
| | | | | | | temporary data. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139725 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unimplemented function prototypes from PathV2. They can be readded ↵Benjamin Kramer2011-09-14
| | | | | | | | when someone cares enough. Patch by Aaron Ballman! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139682 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement a function from PathV2 whose definition is missing.Argyrios Kyrtzidis2011-02-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125574 91177308-0d34-0410-b5e6-96231b3b80d8
* Adds llvm::sys::path::is_separator() to test whether a char is a path separatorZhanyong Wan2011-02-11
| | | | | | | on the host OS. Reviewed by dgregor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125406 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Add identify_magic.Michael J. Spencer2011-01-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123548 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Implement has_magic in terms of get_magic.Michael J. Spencer2011-01-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123545 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/Path: Deprecate PathV1::IsSymlink and replace all uses with ↵Michael J. Spencer2011-01-12
| | | | | | PathV2::is_symlink. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123345 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/Path: Deprecate PathV1::isDirectory and replace all uses with ↵Michael J. Spencer2011-01-11
| | | | | | PathV2::is_directory. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123209 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Implement remove_all.Michael J. Spencer2011-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122884 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Implement directory_entry::status.Michael J. Spencer2011-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122881 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a signed/unsigned comparison warning.Benjamin Kramer2010-12-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122597 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Implement has_magic.Michael J. Spencer2010-12-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122587 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Add missing has_relative_path impl.Michael J. Spencer2010-12-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122243 91177308-0d34-0410-b5e6-96231b3b80d8
* PathV2: Use StringRef::substr to simplify substring creation.Benjamin Kramer2010-12-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122085 91177308-0d34-0410-b5e6-96231b3b80d8
* Missed some StringRefRefs.Benjamin Kramer2010-12-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122077 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass StringRefs by value, for consistency.Benjamin Kramer2010-12-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122074 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/FileSystem: Change file_status predicate functions that cannot fail toMichael J. Spencer2010-12-09
| | | | | | | return their result instead of an error_code. Also add some missing predicate functions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121380 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Remove const from bool return types.Michael J. Spencer2010-12-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121157 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Change most functions in the path namespace to return their workMichael J. Spencer2010-12-07
| | | | | | via their return value instead of an out parameter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121149 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Cleanup separator handling.Michael J. Spencer2010-12-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121110 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Remove the error_code return type from all functions in the pathMichael J. Spencer2010-12-07
| | | | | | | namespace. None of them return anything except for success anyway. These will be converted to returning their result soon. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121109 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Move make_absolute from path to fs.Michael J. Spencer2010-12-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121108 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Use SmallVector::clear instead of set_size.Michael J. Spencer2010-12-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121092 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Move current_path from path to fs and fix the Unix ↵Michael J. Spencer2010-12-07
| | | | | | | | implementation. Unix bug spotted by Dan Gohman. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121090 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/FileSystem: Add directory_iterator implementation.Michael J. Spencer2010-12-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120989 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Fix append to not add a slash to empty or root paths.Michael J. Spencer2010-12-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120988 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence 'may be used uninitialized in this function' warnings. Static analysisBill Wendling2010-12-04
| | | | | | | | may determine that they cannot be used uninitialized. But that might be a bit too much for the compiler to determine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120916 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Remove redundant calls to make_error_code.Michael J. Spencer2010-12-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120913 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/FileSystem: Add status implementation.Michael J. Spencer2010-12-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120870 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/FileSystem: Add create_director{y,ies} implementations.Michael J. Spencer2010-12-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120790 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/FileSystem: Add copy_file implementation. Not tests yet because theMichael J. Spencer2010-12-01
| | | | | | file creation APIs aren't implemented. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120593 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Add is_{absolute,relative} implementation.Michael J. Spencer2010-12-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120560 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Add ↵Michael J. Spencer2010-12-01
| | | | | | has_{root_path,root_name,root_directory,parent_path,filename,stem,extension} implementation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120559 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Add extension implementation.Michael J. Spencer2010-12-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120550 91177308-0d34-0410-b5e6-96231b3b80d8