summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System/Unix
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Only print the stack trace if it was requested. Previously, any call intoReid Spencer2006-06-161-1/+5
| | | | | | | | the Signals module that registered the handlers would cause the stack trace to be generated. Now, you must explicitly call PrintStackTraceOnErrorSignal in order for that to happen. llvm-svn: 28810
* Don't pull in environ, not always safe. Global variables are bad anyway.Evan Cheng2006-06-091-8/+4
| | | | | | | Use execve when explicit environment variables ptr is available. Otherwise just use execv. llvm-svn: 28740
* For PR787:Reid Spencer2006-06-071-0/+8
| | | | | | | | | | | | Provide new llvm::sys::Program facilities for converting the stdout and stdin to binary mode. There is no standard way to do this and the available mechanisms are platform specific. Adjust the bytecode reader and writer to use these methods when their input is stdin or output is stdout. THis avoids the problem with \n writing CRLF to a bytecode file on windows. Patch Contributed by Michael Smith. llvm-svn: 28722
* This function is not documented as throwing an exception and callers don'tChris Lattner2006-05-141-3/+1
| | | | | | handle it. Just silently fail. llvm-svn: 28291
* Fix accidentally committed patch.Chris Lattner2006-05-121-1/+1
| | | | llvm-svn: 28260
* Fix iterator invalidation bug, identified by Coverity.Chris Lattner2006-05-121-1/+1
| | | | llvm-svn: 28257
* For PR351:Reid Spencer2005-12-221-7/+12
| | | | | | | | * Allow the ExecuteAndWait to return negative values if a signal is detected as the reason for the child termination. This is needed to support bugpoint detecting bad things in its child processes. llvm-svn: 24960
* Implement a generic polled Alarm function. This merely removes the systemReid Spencer2005-12-221-0/+68
| | | | | | | dependent portion of the lib/Support/SlowOperationTimer code into the lib/System implementation where it can be ported to different platforms. llvm-svn: 24937
* instead of using mstats, use malloc_zone_statistics which returns numbersChris Lattner2005-11-141-4/+8
| | | | | | that actually make sense. llvm-svn: 24352
* Teach -track-memory to work on darwin. Looking at sbrk doesn't work becauseChris Lattner2005-11-141-10/+12
| | | | | | the default allocator uses mmap. llvm-svn: 24349
* Implement sys::SetInterruptFunction on Unix, stub it on win32 so that theChris Lattner2005-08-021-2/+18
| | | | | | build will not fail llvm-svn: 22578
* support near allocations for the JITAndrew Lenharth2005-07-291-3/+9
| | | | llvm-svn: 22554
* Fix a problem in getDirectoryContents where sub-directory names wereReid Spencer2005-07-281-6/+14
| | | | | | | | | appended to a path string that didn't end in a slash, yielding invalid path names. Path contribute by Nicholas Riley. llvm-svn: 22539
OpenPOWER on IntegriCloud