summaryrefslogtreecommitdiff
path: root/lib/Support/SystemUtils.cpp
Commit message (Collapse)AuthorAge
* Move PrependMainExecutablePath next to its only user.Rafael Espindola2013-06-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183980 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid using PathV1.h in Program.h.Rafael Espindola2013-06-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183940 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge System into Support.Michael J. Spencer2010-11-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120298 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename FindExecutable to PrependMainExecutablePath.Mikhail Glushenkov2010-11-03
| | | | | | Makes it more clear that it is just a path manipulation function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118174 91177308-0d34-0410-b5e6-96231b3b80d8
* Print an error as one big string instead of breaking it up.Dan Gohman2010-11-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118130 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r118057, this is better fixed in appendSuffix itself.Mikhail Glushenkov2010-11-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118088 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't append a dot on platforms which don't use exe suffixes.Dan Gohman2010-11-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118057 91177308-0d34-0410-b5e6-96231b3b80d8
* FindExecutable: remove the executability check.Mikhail Glushenkov2010-11-02
| | | | | | | This makes the behaviour of FindExecutable more consistent across platforms, but I'm not very happy with the name... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118049 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove an unnecessary check and an unnecessary temporary.Mikhail Glushenkov2010-10-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117583 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the FindProgramByName fallback only with known absolute paths.Dan Gohman2010-09-02
| | | | | | | | | I wasn't able to convince myself that all GetMainExecutable implementations always return absolute paths; this prevents unexpected behavior in case they ever don't. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112888 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm::FindExecutable(): Retrieve the name with suffix.exe, if available.NAKAMURA Takumi2010-09-02
| | | | | | bugpoint uses it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112803 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix llvm-extract's "writing bitcode to a terminal" warning, which wasn'tDan Gohman2009-09-11
| | | | | | | | | | | | | | | | working. To support this, add an is_displayed() function to raw_ostream, and generalize Process::StandardOutIsDisplayed and friends in order to support it. Also, call RemoveFileOnSignal before creating a file instead of after, so that the file isn't left behind if the program is interrupted between when the file is created and RemoveFileOnSignal is called. While here, add a -S to llvm-extract and port it to IRReader so that it supports assembly input. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81568 91177308-0d34-0410-b5e6-96231b3b80d8
* Prune #includes from llvm/Linker.h and llvm/System/Path.h,Chris Lattner2009-08-23
| | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79869 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate the ostream version of CheckBitcodeOutputToConsole,Chris Lattner2009-08-23
| | | | | | | | change the raw_ostream one to take the raw_ostream byref instead of byptr. Prune #includes, eliminate a use of Streams.h git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79863 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix FindExecutable to use sys::Path::GetMainExecutable instead ofDan Gohman2009-08-05
| | | | | | | | | | | | | | just argv[0]. And remove the code for searching the current working directory and for searching PATH; the point of FindExecutable is not to find whatever version of the executable can be found by searching around, but to find an executable that accompanies the current executable. Update the tools to use sys::Program::FindProgramByName when they want PATH searching. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78240 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a raw_ostream version of CheckBitcodeOutputToConsole.Dan Gohman2009-07-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75796 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve sys::Path::makeAbsolute on Win32.Daniel Dunbar2009-07-12
| | | | | | | | | - Patch by Viktor Kutuzov! - Minor tweak by me to add llvm_unreachable calls on FIXMEd error paths. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75424 91177308-0d34-0410-b5e6-96231b3b80d8
* Tweak FindExecutable so that relative executable paths work as well.Daniel Dunbar2009-07-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74645 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix FindExecutable to work if given an absolute executable path name.Daniel Dunbar2009-07-01
| | | | | | | - Patch by Viktor Kutuzov, with tweaks by me. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74608 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45418 91177308-0d34-0410-b5e6-96231b3b80d8
* Here is the bulk of the sanitizing.Gabor Greif2007-07-05
| | | | | | | Almost all occurrences of "bytecode" in the sources have been eliminated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37913 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use <sstream> in Streams.h but <iosfwd> instead.Bill Wendling2006-12-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32340 91177308-0d34-0410-b5e6-96231b3b80d8
* Removed more <iostream> includesBill Wendling2006-12-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32321 91177308-0d34-0410-b5e6-96231b3b80d8
* Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, areBill Wendling2006-12-07
| | | | | | | now cerr, cout, and NullStream resp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32298 91177308-0d34-0410-b5e6-96231b3b80d8
* Removed #include <iostream> and replace with llvm_* streams.Bill Wendling2006-11-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31927 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR495:Reid Spencer2005-07-07
| | | | | | | | | | | | | | | | | | | | | | Get rid of the difference between file paths and directory paths. The Path class now simply stores a path that can refer to either a file or a directory. This required various changes in the implementation and interface of the class with the corresponding impact to its users. Doxygen comments were also updated to reflect these changes. Interface changes are: appendDirectory -> appendComponent appendFile -> appendComponent elideDirectory -> eraseComponent elideFile -> eraseComponent elideSuffix -> eraseSuffix renameFile -> rename setDirectory -> set setFile -> set Changes pass Dejagnu and llvm-test/SingleSource tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22349 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR495:Reid Spencer2005-07-07
| | | | | | | | | | | | Change interface to Path class: readable -> canRead writable -> canWrite executable -> canExecute More (incremental) changes coming to close 495. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22345 91177308-0d34-0410-b5e6-96231b3b80d8
* Why output multiple strings, let the compiler concatenate them for us for freeMisha Brukman2005-05-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21845 91177308-0d34-0410-b5e6-96231b3b80d8
* * Order #includes as per style guideMisha Brukman2005-04-22
| | | | | | | * Combine multiple ``std::cerr <<'' statements into one for simplicity git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21458 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespaceMisha Brukman2005-04-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21422 91177308-0d34-0410-b5e6-96231b3b80d8
* Make printing a warning message optional in CheckBytecodeOutputToConsole.Reid Spencer2005-01-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19240 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement a function to print a warning if bytecode output is to be sent toReid Spencer2005-01-01
| | | | | | | a terminal/console. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19237 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR351:Reid Spencer2004-12-19
| | | | | | | | | | * Remove unneeded header files. * Move RedirectFD static function to lib/System/Unix/Program.cpp * Delete RunProgramWithTimeout, now implemented by sys::Program::ExecuteAndWait. RunProgramWithTimeout is now a convenience func. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19040 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR351:Reid Spencer2004-12-14
| | | | | | | * Remove the ExecWait function. This is now in sys::Program::ExecuteAndWait git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18927 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR351:Reid Spencer2004-12-13
| | | | | | | | * Remove isExecutable as its now implemented by sys::Path::executable * Make FindExecutable a thin veneer over sys::Program::FindProgramByName. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18918 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR351:Reid Spencer2004-12-13
| | | | | | | | Remove AllocateRWXMemory as it is not used any more in LLVM. The function has been replaced with sys::Memory::AllocateRWX several months ago. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18912 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes For Bug 352Reid Spencer2004-09-01
| | | | | | | | | Move include/Config and include/Support into include/llvm/Config, include/llvm/ADT and include/llvm/Support. From here on out, all LLVM public header files must be under include/llvm/. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove linux/solaris specific stuff.Chris Lattner2004-07-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15195 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of the printout from the low-level system interfaceChris Lattner2004-07-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15161 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for killing the program if it executes for too long.Chris Lattner2004-07-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15158 91177308-0d34-0410-b5e6-96231b3b80d8
* * Fix file header and nameMisha Brukman2004-06-18
| | | | | | | * Order #includes alphabetically git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14234 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the machine-independent method of querying the page size.Misha Brukman2004-06-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14233 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix spelling, trim empty space, tighten up function header comment.Misha Brukman2004-06-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13940 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for getting executable memory on Windows. This is actuallyChris Lattner2004-05-28
| | | | | | | | | | | much easier than on unix. :) The only evil thing is that windows.h defines a macro named FindExecutable, which collides with one of our names. The JIT now runs on windows, but it cannot resolve external functions (like printf) yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13871 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new function for the JIT. libsupport is now the only library thatChris Lattner2004-05-28
| | | | | | | includes mman.h git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13870 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes to make libSupport build on systems that don't have the wait syscall.Chris Lattner2004-05-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13806 91177308-0d34-0410-b5e6-96231b3b80d8
* Bugpoint was not correctly capturing stderr! This caused it to "find" bugsChris Lattner2004-04-16
| | | | | | | that didn't exist, missing the ones that do :( git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12978 91177308-0d34-0410-b5e6-96231b3b80d8
* Add autoconf support for isStandardOutAConsole ().Brian Gaeke2004-04-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12638 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new function, autoconf support required thoChris Lattner2004-04-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12600 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove config wrapper around <cerrno>Chris Lattner2004-01-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10747 91177308-0d34-0410-b5e6-96231b3b80d8