summaryrefslogtreecommitdiff
path: root/lib/Support/PathV2.cpp
Commit message (Collapse)AuthorAge
* [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
* Support/PathV2: Add stem implementation.Michael J. Spencer2010-12-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120547 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Add filename implementation.Michael J. Spencer2010-12-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120546 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Add native implementation.Michael J. Spencer2010-12-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120539 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV2: Add replace_extension implementation.Michael J. Spencer2010-12-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120514 91177308-0d34-0410-b5e6-96231b3b80d8