summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System/Unix/Path.inc
Commit message (Collapse)AuthorAgeFilesLines
* improve Path::makeUnique when mkstemp/mktemp are not availableChris Lattner2010-07-121-7/+12
| | | | | | patch by Lasse Kärkkäinen in PR7404. llvm-svn: 108110
* Don't bother clearing the Magic string when the magic numberDan Gohman2010-05-271-3/+1
| | | | | | can't be read, since it isn't cleared on other error paths. llvm-svn: 104852
* This doesn't need SmallVector.h anymore.Dan Gohman2010-04-191-1/+0
| | | | llvm-svn: 101790
* Fix this for std::vectors which don't have .data().Dan Gohman2010-04-191-1/+1
| | | | llvm-svn: 101785
* Revert 91528 and use a std::vector instead, fixing an abuse of std::string.Dan Gohman2010-04-191-10/+16
| | | | llvm-svn: 101781
* Fix a grammaro.Dan Gohman2010-03-301-2/+2
| | | | llvm-svn: 99917
* Make Path use StringRef instead of std::string where possible.Jeffrey Yasskin2009-12-171-18/+18
| | | | llvm-svn: 91620
* remove use of SmallVector from Path::makeUnique. Path::makeUniqueChris Lattner2009-12-161-14/+10
| | | | | | is not used by anything performance sensitive, so just use std::string. llvm-svn: 91528
* eliminate an extraneous use of SmallVector in a case whereChris Lattner2009-12-161-6/+4
| | | | | | a fixed size buffer is perfectly fine. llvm-svn: 91527
* Remove spurious extern.Daniel Dunbar2009-12-091-1/+1
| | | | llvm-svn: 90937
* Remove dead returns.Benjamin Kramer2009-11-291-2/+0
| | | | llvm-svn: 90083
* This patch ensures that Path::GetMainExecutable is able to handle theKovarththanan Rajaratnam2009-11-291-2/+6
| | | | | | | | | case where realpath() fails. When this occurs we segfault trying to create a std::string from a NULL pointer. Fixes PR5635. llvm-svn: 90082
* API change Path::isSpecialFile to Path::isRegularFile, improve semantics in ↵Edward O'Callaghan2009-11-251-5/+5
| | | | | | regards to comments from 89765 post review. llvm-svn: 89848
* Remove bogus error handling code.Daniel Dunbar2009-11-241-6/+2
| | | | llvm-svn: 89786
* Provide Path::isSpecialFile interface for PR5568.Edward O'Callaghan2009-11-241-2/+20
| | | | llvm-svn: 89765
* Add a shortcut for OS X to Path::GetMainExecutable. This gives a nice speedup onBenjamin Kramer2009-09-091-1/+15
| | | | | | clang's testsuite. llvm-svn: 81333
* remove the last uses of Config/alloca.hChris Lattner2009-08-231-3/+7
| | | | llvm-svn: 79873
* Prune #includes from llvm/Linker.h and llvm/System/Path.h,Chris Lattner2009-08-231-7/+7
| | | | | | | | | | | | | | | | | | forcing them down into various .cpp files. This change also: 1. Renames TimeValue::toString() and Path::toString() to ::str() for similarity with the STL. 2. Removes all stream insertion support for sys::Path, forcing clients to call .str(). 3. Removes a use of Config/alloca.h from bugpoint, using smallvector instead. 4. Weans llvm-db off <iostream> sys::Path really needs to be gutted, but I don't have the desire to do it at this point. llvm-svn: 79869
* Minor code simplification.Dan Gohman2009-08-051-4/+2
| | | | llvm-svn: 78239
* Remove another F_OK.Dan Gohman2009-07-291-1/+1
| | | | llvm-svn: 77405
* It isn't necessary to use F_OK when using R_OK or similar.Dan Gohman2009-07-281-2/+2
| | | | llvm-svn: 77392
* Improve sys::Path::makeAbsolute on Win32.Daniel Dunbar2009-07-121-0/+13
| | | | | | | | - Patch by Viktor Kutuzov! - Minor tweak by me to add llvm_unreachable calls on FIXMEd error paths. llvm-svn: 75424
* "UNIX paths can contain non-ASCII characters, so Path::isValid() should not ↵Chris Lattner2009-07-121-9/+1
| | | | | | | | reject paths with such characters in them. The attached patch removes the check from Path::isValid()." patch by Benjamin Kramer! llvm-svn: 75421
* add a new static method to portably determine whether a patch isChris Lattner2009-06-151-0/+8
| | | | | | absolute or not, based on a patch by Gregory Curfman! llvm-svn: 73368
* Untabification.Bill Wendling2009-05-301-42/+41
| | | | llvm-svn: 72604
* Make Unix.h:MakeErrMsg separate the prefix and errno string, so we get:Daniel Dunbar2009-04-201-3/+3
| | | | | | | | | | | | | | | | | clang: error: unable to make temporary file: /etc/cc: can't make unique filename: Permission denied instead of clang: error: unable to make temporary file: /etc/cc: can't make unique filenamePermission denied for example. Also, audited the uses of MakeErrMsg to make the prefix strings consistent (not end with newline/punctuation/space/": "). llvm-svn: 69626
* Fix main executable path name resolution on FreeBSD, patch by Chris Lattner2009-03-021-1/+60
| | | | | | Ed Schouten! llvm-svn: 65882
* If an executable is run through a symlink, dladdr will return theChris Lattner2009-02-191-3/+8
| | | | | | | | symlink. We really want the ultimate executable being run, not the symlink. This lets clang find its headers when invoked through a symlink. rdar://6602012 llvm-svn: 65017
* Fix warning on gcc 4.3.Mikhail Glushenkov2009-02-151-1/+4
| | | | | | "system() declared with attribute warn_unused_result." llvm-svn: 64574
* Whitespace fixes.Mikhail Glushenkov2009-02-151-58/+58
| | | | llvm-svn: 64573
* add a helper method to sys::Path for clang, patch byChris Lattner2008-08-111-0/+6
| | | | | | Kovarththanan Rajaratnam! llvm-svn: 54655
* Create temp. file in current path.Devang Patel2008-07-241-6/+3
| | | | llvm-svn: 53973
* While creating temp. file on disk, if the current filename points to a ↵Devang Patel2008-07-221-2/+8
| | | | | | existing directory then create new temp. file inside the directory. llvm-svn: 53929
* Fix GetMainExecutable. Patch by Sam Bishop.Seo Sanghyeon2008-06-271-4/+2
| | | | llvm-svn: 52847
* Add a missing semicolon.Wojciech Matyjewicz2008-06-151-1/+1
| | | | llvm-svn: 52290
* Fix the sys::Path::getSuffix() implementation.Argyrios Kyrtzidis2008-06-151-0/+16
| | | | llvm-svn: 52288
* Make constructors target-specific. This fixes problems where the path wouldNick Lewycky2008-05-111-0/+6
| | | | | | include backslashes on Windows. This should fix llvm-ld problems on win32. llvm-svn: 50960
* Fix more -Wshorten-64-to-32 warnings.Evan Cheng2008-05-051-2/+2
| | | | llvm-svn: 50659
* Make getDirnameSep a static method (not part of Path's interface).Ted Kremenek2008-04-071-1/+3
| | | | llvm-svn: 49354
* Added method Path::getDirname().Ted Kremenek2008-04-071-2/+4
| | | | llvm-svn: 49352
* Re-implemented Path::createDirectoryOnDisk (for Unix).Ted Kremenek2008-04-031-32/+39
| | | | | | | | | | | | | | | | | | | | | | | | This method allows one to create a directory, and optionally create all parent directories that do not exist. The original implementation would require that *all* directories along a path are writable by the user, including directories that already exist. For example, suppose we wanted to create the directory "/tmp/foo/bar", and the directory "/tmp" already exists, but not "/tmp/foo". Since "/tmp" is writable by all users, the original implementation would work, and create "/tmp/foo", followed by "/tmp/bar". A problem occurred, however if one wanted to created the directory "/Users/myuser/bar" (or equivalently "/home/myuser/bar"), and "/Users/myuser" already existed and is writable by the current user. The directory "/User/myuser" is writable by the user, but "/User" is not. The original implementation of createDirectoryOnDisk would return with failure since "/User" is not writable, even though "/User/mysuser" is writable. The new implementation works by recursively creating parents as needed, and thus doesn't need to check the permissions on every directory in a path. llvm-svn: 49162
* add some #includes.Chris Lattner2008-04-011-2/+8
| | | | llvm-svn: 49036
* Implement Path::MapInFilePages/UnMapFilePages on unix, which Chris Lattner2008-04-011-5/+10
| | | | | | provides fast MappedFile::getFile for large files. llvm-svn: 49034
* Stub out some sys::Path::MapInFilePages/UnMapFilePages methods.Chris Lattner2008-04-011-0/+10
| | | | llvm-svn: 49030
* Fix Path::GetMainExecutable on cygwin, patch by Sam Bishop.Chris Lattner2008-03-131-1/+10
| | | | llvm-svn: 48328
* Stub out a Path::GetMainExecutable call to find the path to theChris Lattner2008-03-031-0/+18
| | | | | | main executable of a program. This needs to be implemented on windows. llvm-svn: 47835
* Add path separator support, patch by Sam Bishop. Chris Lattner2008-02-271-19/+2
| | | | llvm-svn: 47662
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Added "GetCurrentDirectory()" to sys::Path.Ted Kremenek2007-12-181-0/+10
| | | | llvm-svn: 45182
* Added "isDirectory" method to llvm::sys::Path.Ted Kremenek2007-12-181-0/+8
| | | | llvm-svn: 45168
OpenPOWER on IntegriCloud