Commit Graph

73 Commits

Author SHA1 Message Date
Misha Brukman
6b8a63ae58 Remove vim settings from source code; people should use llvm/utils/vim/vimrc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21704 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-05 22:33:09 +00:00
Misha Brukman
63b3afa984 Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21411 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 20:48:15 +00:00
Reid Spencer
78202b4c50 Add two new methods for getting the User Id and Group Id values for the
current process.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21400 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 16:12:04 +00:00
Chris Lattner
e6585ab601 Do not clean up if the MappedFile was never used or if the client already
closed the file.  This unbreaks the build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19871 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-28 16:08:23 +00:00
Reid Spencer
1aa2649fdc Fix the documentation for executeAndWait so the argument comments are
actually attributed to the arguments by doxygen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19473 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 06:37:27 +00:00
Jeff Cohen
e269a1ac1c Use size_t instead of long to represent memory usage. long is 32 bits
on 64-bit Windows.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19393 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 20:15:57 +00:00
Reid Spencer
a01aade75d Add functions for determining if the stdin/out/err is connected to a
console or not.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19233 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-01 22:29:26 +00:00
Jeff Cohen
00dcbaa6e5 Fix bountiful sources of VC++ 'possible loss of data' warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19224 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-01 18:58:23 +00:00
Reid Spencer
68fdcc123b For PR351:
* Move implementation of sys::PreventCoreFiles function to this file from
  the now defunct SysConfig abstraction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19159 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-27 06:17:27 +00:00
Reid Spencer
d0ae93f022 For PR351:
SysConf abstraction was pointless because it had a single function in it that
pertained only to the current process. So merge it into the Process abstraction
and remove the files completely.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19149 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-27 06:15:14 +00:00
Reid Spencer
e6b77ede40 For PR351:
* Add GetMallocUsage as a wrapper around mallinfo()
* Add GetTotalMemoryUsage to get approximate RSS size
* Add GetTimeUsage to get elapsed/system/user time


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19051 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 00:58:53 +00:00
Reid Spencer
9a5c432a3d Wrap long lines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19050 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 00:58:41 +00:00
Reid Spencer
7eae81d4da For PR351:
Incorporate the abilities of RunPRogramWithTimeout into
sys::Program::ExecuteAndWait so that redirection and a timeout are optionally
supported.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19039 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-19 17:59:57 +00:00
Reid Spencer
3874730dd4 Correct the name of the method. CopyFiles -> CopyFile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19025 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-18 00:14:24 +00:00
Reid Spencer
2d01af2c31 Adjust documentation of GetBytecodeLibraryPaths after removing LLVMGCCDIR
support from it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18972 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 22:49:18 +00:00
Reid Spencer
07f9f4e2a4 Fix a file overwrite bug in llvm-ar introduced by changes to
createTemporaryFile semantics where it doesn't create a fully unique name
if the basename doesn't exist. This functionality is now optionally
provided by the boolean reuse_current parameter to createTemporaryFile and
makeUnique. The default values differ because of the way these functions
are used in LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18961 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 08:32:45 +00:00
Reid Spencer
c29befb554 For PR351:
* Fix implementation and documentation about LLVMGCCDIR/bytecode-libs
* Add the makeUnique method, replacement for getUniqueFilename in Support.
* Add the sys::CopyFile function, replacement for CopyFile in Support.
* Move GetLLVMConfigDir() into generic code area since its generic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18947 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 01:50:13 +00:00
Jeff Cohen
626e38e481 Implement Win32 Path::getStatusInfo(), TimeValue::toString()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18930 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-14 05:26:43 +00:00
Reid Spencer
a077c9a0a2 For PR351:
* Fix commentary, wrap lines, etc.
* Add an environment pointer to the ExecuteAndWait function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18926 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-14 04:17:12 +00:00
Reid Spencer
77cc91deaa For PR351:
Implement three new functions to allow setting access/permission bits on
the file referenced by a path. The makeReadable and makeExecutable methods
replace the FileUtilities MakeFileReadable and MakeFileExecutable
functions. The makeWritable function is new and provided for consistency
since Path has a writable() method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18907 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 19:59:50 +00:00
Reid Spencer
9d88d1aaab For PR351: \
The getFileTimestamp and getFileSize functions have been removed from  \
FileUtilities.{h,cpp}. They are replaced by Path::getTimestamp and  \
Path::getSize,respectively.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18892 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 17:01:53 +00:00
Reid Spencer
732f92d56e * Add a std::ostream inserter for sys::Path
* Correct the std::string constructor to take a const reference.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18877 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 06:57:15 +00:00
Reid Spencer
56c3ed854f Make the size() method const
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18852 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 02:58:51 +00:00
Reid Spencer
e12d00da9c For PR351:\
* Consolidate path retrieval into just two methods. \
* Add FindLibrary as a convenience function. \
* Add isDynamicLibrary for testing for dynamic libs. \
* Make toString constant and reference clean.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18847 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 02:57:53 +00:00
Reid Spencer
1fce09125c Path::get -> Path::toString
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18785 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-11 00:14:15 +00:00
Reid Spencer
b0b0ea07bb Add in some methods for use by the JIT. LoadLibraryPermanently brings the
library into the address space permanently. SearchForAddressOfSymbol looks
in all previously permanently loaded libraries and any currently open
libraries for a symbol, instead of just one library like GetAddressOfSymbol


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18354 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-29 13:27:56 +00:00
Reid Spencer
7a9369065d Make the default constructor cause the program's symbols to be loaded as
if it was a dynamic library.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18340 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-29 10:38:54 +00:00
Reid Spencer
0de02a6ba9 Dynamic Library abstraction. This makes the abstraction of a single dynamic
library (shared library/shared object) whose symbols can be looked up
dynamically. Used for plug-ins.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17940 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-18 04:33:39 +00:00
Reid Spencer
8bf7fba10b Per code review:
* get rid of (void) construct in function declarations
* make toString a const member
* add a default implementation of toString for Win32


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17873 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-16 06:22:17 +00:00
Reid Spencer
b608a81a18 Per code review:
* Clean up the StatusInfo constructor to construct all members and give
  them reasonable values.
* Get rid of the Vector typedef and make the interface to
  getDirectoryContent use a std::set instead of a std::vector so the dir
  content is sorted.
* Make the getStatusInfo method const and not return a useless boolean.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17872 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-16 06:15:19 +00:00
Reid Spencer
b5a6f419d0 Changes per code review:
* Document StatusInfo fields better
* No lines > 80 cols
* Have getStatusInfo return bool if file doesn't exist
* Don't document in detail how temporary file name should be created.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17808 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 23:29:00 +00:00
Reid Spencer
f31c7ff957 *Make naming convention consistent.*Add convertion to/from Unix Epoch time.*Add ability to convert to readable string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17762 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 21:53:55 +00:00
Reid Spencer
00e9ca7148 Make the remove*OnSignal functions deal with Paths not strings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17761 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 21:53:09 +00:00
Reid Spencer
c5fe25314c *Put the StatusInfo type in the right section. *Provide the ability to rename a file.*Provide the ability to get/set stat(2) information.*Provide the ability to identify LLVM file types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17760 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 21:52:22 +00:00
Reid Spencer
8d2a8c3115 Allow explicit closing of the MappedFile, before destruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17759 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 21:51:36 +00:00
Reid Spencer
8ee9da05ed Provide conversion from posix time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17656 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-09 20:29:10 +00:00
Reid Spencer
9195f37c5f * Implement getStatusInfo for getting stat(2) like information
* Implement createTemporaryFile for mkstemp(3) functionality
* Fix isBytecodeFile to accept llvc magic # (compressed) as bytecode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17654 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-09 20:26:31 +00:00
Reid Spencer
07adb2836b Stop propagating method names that violate the coding standard
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17498 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-05 22:15:36 +00:00
Chris Lattner
1fca5ff62b Convert 'struct' to 'class' in various places to adhere to the coding standards
and work better with VC++.  Patch contributed by Morten Ofstad!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17281 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-27 16:14:51 +00:00
Misha Brukman
28ab668c10 Wrap comments at 80 cols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17261 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-26 18:00:03 +00:00
Misha Brukman
e196516fa7 * Fit constructor initializer on a single line
* Delete blank chars at end of line to fit into 80 cols


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17137 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-19 00:29:16 +00:00
Misha Brukman
c2ab5a2a63 Fix file comment header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16942 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-12 21:48:02 +00:00
Chris Lattner
c441f1e1c7 Fix #include flavor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16658 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-04 18:10:18 +00:00
Reid Spencer
ce4e6ade3e Minor corrections suggested by Chris' ever-watchful eye.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16651 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-04 17:26:26 +00:00
Reid Spencer
9737492204 First version of the MappedFile abstraction for operating system idependent
mapping of files. This first version uses mmap where its available. The
class needs to implement an alternate mechanism based on malloc'd memory
and file reading/writing for platforms without virtual memory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16649 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-04 11:08:32 +00:00
Reid Spencer
45392b694f Clean up the interface of TimeValue:
- get rid of unneeded constructors
- get rid of duplicate methods/constructors/operators
- normalize to LLVM coding standards
- wrap to 80 columns.

Many thanks to Alkis Evlogimenos for his suggestions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16514 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-25 08:29:54 +00:00
Reid Spencer
9926c31351 Initial implementation of the TimeValue abstraction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16511 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-24 23:25:19 +00:00
Reid Spencer
9ab80b794e Add the GetLibraryPath method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16322 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-13 23:46:23 +00:00
Reid Spencer
33189e787b Simplify the sys::Memory interface per Chris' request.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16318 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-13 22:38:11 +00:00
Reid Spencer
2565943289 Clean up the interface and implementation of sys::Program so that it is
cleanly dissociated from the sys::Path class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16315 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-13 21:48:44 +00:00