summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System/Unix
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Remove dead file and directory.Chris Lattner2007-12-081-30/+0
| | | | llvm-svn: 44720
* Remove spurious consts. This fixes warnings with compilers thatDan Gohman2007-09-141-2/+2
| | | | | | are strict about such things. llvm-svn: 41956
* Add lengthof and endof templates that hide a lot of sizeof computations.Owen Anderson2007-09-071-3/+4
| | | | | | Patch by Sterling Stein! llvm-svn: 41758
* Solaris 2.x does not have RLIMIT_RSS, check for this symbol (analog NetBSD ↵Gabor Greif2007-07-061-1/+1
| | | | | | below), should subsume Cygwin llvm-svn: 37939
* Here is the bulk of the sanitizing.Gabor Greif2007-07-051-1/+1
| | | | | | Almost all occurrences of "bytecode" in the sources have been eliminated. llvm-svn: 37913
* Fix LLVM build on NetBSD. Patch by Neil Booth.Devang Patel2007-06-041-0/+2
| | | | llvm-svn: 37410
* Fix a bug where the bcreader could crash on .bc files that were an exactChris Lattner2007-05-111-0/+1
| | | | | | multiple of the page size, due to a bug in MappedFile llvm-svn: 36980
* pull some win32 code into common code, add bitcode identification support.Chris Lattner2007-05-061-31/+0
| | | | llvm-svn: 36846
* Cygwin doesn't have the RSS_LIMIT for get/setrlimit.Reid Spencer2007-04-231-0/+2
| | | | llvm-svn: 36361
* For PR1291:Reid Spencer2007-04-072-47/+54
| | | | | | Implement the PathWithStatus class and its use throughout lib/System. llvm-svn: 35742
* Use the stat information in the Path object, if it is already obtained. ThisReid Spencer2007-03-291-4/+3
| | | | | | | avoids a call to ::fstat by MappedFile when the file size information was already obtained by the Path object. llvm-svn: 35477
* For PR789:Reid Spencer2007-03-292-34/+39
| | | | | | | | Make the sys::Path::getFileStatus function more efficient by having it return a pointer to the FileStatus structure rather than copy it. Adjust uses of the function accordingly. Also, fix some memory issues in sys::Path. llvm-svn: 35476
* Add a uniqueID field to the FileStatus structure for Paths. This will mapReid Spencer2007-03-291-0/+1
| | | | | | | to the inode number on Unix and something far less unique on Windows. The windows case needs to be improved. llvm-svn: 35461
* For PR789:Reid Spencer2007-03-291-12/+22
| | | | | | | | | * Add a method: bool isAbsolute() const, which determines if the path name is absolute or not. * Implement caching of file status information in the Path object. Allow it to be updated forcefully or lazily re-fetched from the cached value. llvm-svn: 35456
* Add possibility to set memory limit for binaries run via libSystem. ThisAnton Korobeynikov2007-02-161-0/+30
| | | | | | is especially needed for bugpoint. This partly implements PR688 llvm-svn: 34349
* Eliminate "control reaches end of non-void function" warnings.Reid Spencer2006-12-051-0/+3
| | | | llvm-svn: 32225
* Use new config.h macroChris Lattner2006-09-141-2/+2
| | | | llvm-svn: 30321
* On Mac OS/X, make Process::PreventCoreFiles disable crash reporter forChris Lattner2006-09-141-7/+29
| | | | | | | the process in addition to disabling core file emission. This speeds up bugpoint on default-configured macs by several orders of magnitude. llvm-svn: 30317
* For PR797:Reid Spencer2006-08-253-9/+16
| | | | | | | Make the Win32 code exception free (untested/uncompiled) which forced some interface changes which had ripple effect. This should be the last of 797. llvm-svn: 29884
* For PR797:Reid Spencer2006-08-233-109/+63
| | | | | | | Final removal of exceptions from lib/System and adjustment of users to accommodate. llvm-svn: 29846
* For PR797:Reid Spencer2006-08-232-36/+24
| | | | | | | Eliminate exception throwing from Path::renamePathOnDisk and adjust its users correspondingly. llvm-svn: 29843
* For PR797:Reid Spencer2006-08-231-5/+8
| | | | | | Remove exception throwing from Path::getDirectoryContents and its users. llvm-svn: 29841
* For PR797:Reid Spencer2006-08-231-15/+22
| | | | | | | Remove exceptions from the Path::create*OnDisk methods. Update their users to handle error messages via arguments and result codes. llvm-svn: 29840
* For PR797:Reid Spencer2006-08-221-9/+18
| | | | | | Change the Path::make*OnDisk methods exception free and adjust their usage. llvm-svn: 29836
* Make the sys::Path::GetTemporaryDirectory method not throw exceptions andReid Spencer2006-08-221-23/+30
| | | | | | adjust users of it to compensate. llvm-svn: 29831
* Don't throw needlessly. Failure of gettimeofday is *very* unlinkely soReid Spencer2006-08-221-2/+7
| | | | | | just return MinTime if that should ever happen. llvm-svn: 29826
* For PR797:Reid Spencer2006-08-221-10/+15
| | | | | | Make MappedFile not throw any exceptions. llvm-svn: 29816
* For PR797:Reid Spencer2006-08-221-8/+13
| | | | | | | Fix a bug in my last patch that botched file redirection by using explicit scoping of if statements. llvm-svn: 29815
* Make an error message a little more intelligible.Reid Spencer2006-08-221-1/+1
| | | | llvm-svn: 29808
* For PR797:Reid Spencer2006-08-212-23/+67
| | | | | | | Remove all exception code from Program.inc and implement its new interface with an ErrMsg string argument. llvm-svn: 29790
* For PR797:Reid Spencer2006-08-211-1/+1
| | | | | | | | Make sys::Program::ExecuteAndWait not throw exceptions and update any affected code. It now return -9999 to signal that the program couldn't be executed. Only one case (in bugpoint) actually examines the result code. llvm-svn: 29785
* Remove extraneous #include.Reid Spencer2006-08-071-1/+0
| | | | llvm-svn: 29541
* Make the removal of files use Path::eraseFromDisk just like it does forReid Spencer2006-08-071-4/+5
| | | | | | | | | | | the removal of directories. Using std::remove is indiscriminate and can lead to the removal of things like /dev/null if run as root. The Path::eraseFromDisk method ensures that we only ever remove regular files or directories, but never character or block special nodes. This should clear up the problem with usage like: llvm-as -o /dev/null which is used in the llvm-test makefiles. llvm-svn: 29540
* Add a note about how the "isFile" check in Path::eraseFromDisk preventsReid Spencer2006-08-071-0/+5
| | | | | | the erasure of non-file paths like /dev/null. llvm-svn: 29539
* Remove some now-dead methods. Use getFileStatus instead.Chris Lattner2006-08-011-34/+0
| | | | llvm-svn: 29447
* Use getFileStatus instead of Path::isDirectory().Chris Lattner2006-08-011-7/+6
| | | | llvm-svn: 29443
* elimiante some syscallsChris Lattner2006-08-011-15/+12
| | | | llvm-svn: 29442
* Modify setStatusInfoOnDisk to not throw an exception.Chris Lattner2006-07-281-4/+4
| | | | llvm-svn: 29402
* Modify Path::eraseFromDisk to not throw an exception.Chris Lattner2006-07-281-24/+29
| | | | llvm-svn: 29400
* Change Path::getStatusInfo to return a boolean and error string on an errorChris Lattner2006-07-281-15/+15
| | | | | | | | instead of throwing an exception. This reduces the amount of code that is exposed to exceptions (e.g. FileUtilities), though it is clearly only one step along the way. llvm-svn: 29395
* simple optimization: don't bother calling "exists" (which calls the syscallChris Lattner2006-07-181-3/+0
| | | | | | | "access"). Instead, just let the open call fail if the file doesn't exist. This reduces the # syscalls executed. llvm-svn: 29173
* Remove a dead conditional: info_ can only be allocated if FD is good. ImproveChris Lattner2006-07-181-5/+4
| | | | | | spacing llvm-svn: 29172
* The only entry in the stat buf this code cares about is the size. Keep justChris Lattner2006-07-181-14/+14
| | | | | | the size, not the whole stat buffer. llvm-svn: 29171
* Reduce code in the error path by only allocating info_ if everything looksChris Lattner2006-07-181-10/+8
| | | | | | good. llvm-svn: 29170
* Unindent some codeChris Lattner2006-07-181-25/+24
| | | | llvm-svn: 29169
* Turn an if into an else if.Chris Lattner2006-07-121-2/+2
| | | | llvm-svn: 29129
* no need to do a stat then an lstat. lstat will tell us if normal files ↵Chris Lattner2006-07-071-7/+4
| | | | | | don't exist. llvm-svn: 29068
* Change AllocateRWX/DeallocateRWX to not throw an exception.Chris Lattner2006-07-072-31/+61
| | | | llvm-svn: 29058
OpenPOWER on IntegriCloud