summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/PathV2.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Rename PathV2 to just Path now that it is the only one.Rafael Espindola2013-06-261-969/+0
| | | | llvm-svn: 185015
* Don't assume ResultPath is null terminated.Rafael Espindola2013-06-251-1/+2
| | | | llvm-svn: 184824
* Cleanup in unique_file when we only want the name.Rafael Espindola2013-06-251-2/+10
| | | | | | | | | This is really ugly, but it is no worse than what we have in clang right now and it is better to get it working first and clean/optimize it afterwards. Will be tested from clang in the next patch. llvm-svn: 184802
* Add a version of unique_file that return just the file name.Rafael Espindola2013-06-181-1/+12
| | | | llvm-svn: 184206
* Basic support for parsing Mach-O universal binaries in LLVMObject libraryAlexey Samsonov2013-06-181-2/+1
| | | | llvm-svn: 184191
* Move PathV2.h to Path.hRafael Espindola2013-06-111-1/+1
| | | | | | | Most clients have already been moved from Path V1 to V2. The ones using V1 now include PathV1.h explicitly. llvm-svn: 183801
* Port r183666 to identify_magic.Rafael Espindola2013-06-111-2/+3
| | | | | | | | | | | | | It will be tested in the next commit which moves another user to identify_magic. Original message: Fix an out of bounds array access. We were looking at Magic[5] without checking Length. Since this path would not return unless Length >= 18 anyway, just move the >= 18 check up. llvm-svn: 183753
* Fix variable name.Rafael Espindola2013-06-111-29/+29
| | | | llvm-svn: 183752
* Add a missing 'e'.Rafael Espindola2013-06-101-1/+1
| | | | llvm-svn: 183692
* [Support][FileSystem] Fix identify_magic for big endian ELF.Michael J. Spencer2013-04-051-2/+5
| | | | llvm-svn: 178905
* <rdar://problem/13477190> On Darwin, use DARWIN_USER_TEMP_DIR or ↵Douglas Gregor2013-03-211-0/+24
| | | | | | | | | | 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. llvm-svn: 177669
* Add static cast to unsigned char whenever a character classification ↵Guy Benyei2013-02-121-1/+2
| | | | | | function is called with a signed char argument, in order to avoid assertions in Windows Debug configuration. llvm-svn: 175006
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-1/+1
| | | | | | | | | | | | | | | | | 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
* [Support/PathV2] Fix out of bounds access in identify_magic when the file is ↵Michael J. Spencer2012-06-191-0/+2
| | | | | | empty. llvm-svn: 158704
* [PathV2]: Fix bug in create_directories which caused infinite recursion onMichael J. Spencer2012-03-211-5/+6
| | | | | | | | som inputs. Bug found and fix proposed by Kal Conley! llvm-svn: 153225
* Support/PathV2: Fix namespace qualifier in make_absolute(), for Win32.Daniel Dunbar2012-02-291-1/+1
| | | | llvm-svn: 151685
* Support/PathV2: Fix make_absolute() to match is_absolute() and not expect toDaniel Dunbar2012-02-291-2/+6
| | | | | | | | | | 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. llvm-svn: 151681
* [PathV2] Fix bug in relative_path.Michael J. Spencer2012-02-291-1/+1
| | | | llvm-svn: 151675
* Change default error_code ctor to a 'named ctor' so it's more self-documenting.David Blaikie2012-02-091-13/+11
| | | | | | | | | | | 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
* PathV2: Remove static StringRef ctors.Benjamin Kramer2012-02-081-4/+4
| | | | llvm-svn: 150071
* Support/FileSystem: Add file_magic and move a vew clients over to it.Michael J. Spencer2011-12-131-2/+114
| | | | llvm-svn: 146523
* Cleanup whitespace.Michael J. Spencer2011-12-131-3/+3
| | | | llvm-svn: 146521
* Support/Windows: Cleanup scoped handles.Michael J. Spencer2011-12-121-1/+3
| | | | llvm-svn: 146362
* Fix a minor bug in fs::create_directories. Patch by Albert Wong.Eli Friedman2011-09-161-1/+1
| | | | llvm-svn: 139928
* Update the comment for system_temp_directory() to indicate when itDouglas Gregor2011-09-141-1/+1
| | | | | | | will ignore the erasedOnReboot option, and properly escape the backslash in "C:\TEMP". Thanks to Aaron and Francois. llvm-svn: 139755
* Add a simple routine to determine the typical system directory forDouglas Gregor2011-09-141-0/+30
| | | | | | temporary data. llvm-svn: 139725
* Remove unimplemented function prototypes from PathV2. They can be readded ↵Benjamin Kramer2011-09-141-3/+1
| | | | | | | | when someone cares enough. Patch by Aaron Ballman! llvm-svn: 139682
* Implement a function from PathV2 whose definition is missing.Argyrios Kyrtzidis2011-02-151-0/+6
| | | | llvm-svn: 125574
* Adds llvm::sys::path::is_separator() to test whether a char is a path separatorZhanyong Wan2011-02-111-12/+13
| | | | | | on the host OS. Reviewed by dgregor. llvm-svn: 125406
* Support/PathV2: Add identify_magic.Michael J. Spencer2011-01-151-0/+10
| | | | llvm-svn: 123548
* Support/PathV2: Implement has_magic in terms of get_magic.Michael J. Spencer2011-01-151-26/+8
| | | | llvm-svn: 123545
* Support/Path: Deprecate PathV1::IsSymlink and replace all uses with ↵Michael J. Spencer2011-01-121-0/+8
| | | | | | PathV2::is_symlink. llvm-svn: 123345
* Support/Path: Deprecate PathV1::isDirectory and replace all uses with ↵Michael J. Spencer2011-01-111-0/+16
| | | | | | PathV2::is_directory. llvm-svn: 123209
* Support/PathV2: Implement remove_all.Michael J. Spencer2011-01-051-0/+37
| | | | llvm-svn: 122884
* Support/PathV2: Implement directory_entry::status.Michael J. Spencer2011-01-051-0/+4
| | | | llvm-svn: 122881
* Fix a signed/unsigned comparison warning.Benjamin Kramer2010-12-281-1/+1
| | | | llvm-svn: 122597
* Support/PathV2: Implement has_magic.Michael J. Spencer2010-12-281-0/+38
| | | | llvm-svn: 122587
* Support/PathV2: Add missing has_relative_path impl.Michael J. Spencer2010-12-201-0/+7
| | | | llvm-svn: 122243
* PathV2: Use StringRef::substr to simplify substring creation.Benjamin Kramer2010-12-171-27/+17
| | | | llvm-svn: 122085
* Missed some StringRefRefs.Benjamin Kramer2010-12-171-1/+1
| | | | llvm-svn: 122077
* Pass StringRefs by value, for consistency.Benjamin Kramer2010-12-171-13/+13
| | | | llvm-svn: 122074
* Support/FileSystem: Change file_status predicate functions that cannot fail toMichael J. Spencer2010-12-091-0/+27
| | | | | | | return their result instead of an error_code. Also add some missing predicate functions. llvm-svn: 121380
* Support/PathV2: Remove const from bool return types.Michael J. Spencer2010-12-071-9/+9
| | | | llvm-svn: 121157
* Support/PathV2: Change most functions in the path namespace to return their workMichael J. Spencer2010-12-071-100/+62
| | | | | | via their return value instead of an out parameter. llvm-svn: 121149
* Support/PathV2: Cleanup separator handling.Michael J. Spencer2010-12-071-7/+10
| | | | llvm-svn: 121110
* Support/PathV2: Remove the error_code return type from all functions in the pathMichael J. Spencer2010-12-071-90/+60
| | | | | | | namespace. None of them return anything except for success anyway. These will be converted to returning their result soon. llvm-svn: 121109
* Support/PathV2: Move make_absolute from path to fs.Michael J. Spencer2010-12-071-55/+57
| | | | llvm-svn: 121108
* Support/PathV2: Use SmallVector::clear instead of set_size.Michael J. Spencer2010-12-071-1/+1
| | | | llvm-svn: 121092
* Support/PathV2: Move current_path from path to fs and fix the Unix ↵Michael J. Spencer2010-12-071-1/+1
| | | | | | | | implementation. Unix bug spotted by Dan Gohman. llvm-svn: 121090
* Support/FileSystem: Add directory_iterator implementation.Michael J. Spencer2010-12-061-0/+10
| | | | llvm-svn: 120989
OpenPOWER on IntegriCloud