Commit Graph

172 Commits

Author SHA1 Message Date
Reid Spencer
424ac897ca For PR351:
* Consolidate implementation for Unix systems into Unix/Program.cpp
* Avoid use of symbolic link to #include platform-specific implementation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19154 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-27 06:16:25 +00:00
Reid Spencer
c87d7cc788 For PR351:
* Consolidate implementation for Unix systems into Unix/Signals.cpp
* Avoid use of symbolic link to #include platform-specific implementation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19153 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-27 06:16:11 +00:00
Reid Spencer
ce7999598a For PR351:
* Consolidate implementation for Unix systems into Unix/Memory.cpp
* Avoid use of symbolic link to #include platform-specific implementation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19152 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-27 06:15:57 +00:00
Reid Spencer
b9ed2c17da For PR351:
* Consolidate implementation for Unix systems into Unix/MappedFile.cpp
* Avoid use of symbolic link to #include platform-specific implementation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19151 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-27 06:15:43 +00:00
Reid Spencer
0098e64da7 For PR351:
* Consolidate implementation for Unix systems into Unix/Process.cpp
* Avoid use of symbolic link to #include platform-specific implementation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19150 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-27 06:15:29 +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
Jeff Cohen
c2b9162e5d mingw doesn't support the official debug API.
Old versions of the C runtime somehow get loaded into the process.  Make
sure they aren't searched for symbols.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19141 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-25 04:50:17 +00:00
Jeff Cohen
a4c9751265 Get VC++ building again
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19140 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-24 16:26:47 +00:00
Jeff Cohen
1a4663516b Eliminate use of ltdl.c when doing a VC++ build. Because libtool isn't used,
ltdl's LGPL license would infect all of LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19137 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-24 07:57:09 +00:00
Reid Spencer
69a1616106 For PR351:
Merge implementations of isValid and GetTemporaryDirectory into this file. There
is not any point having the operating system specific files for such little
variation between the Unix family of systems.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19134 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-24 06:29:42 +00:00
Reid Spencer
f77bdc4892 For PR351:
This implementation is no longer needed, its been merged to Unix/Path.cpp since
there is such little variation between the platforms.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19133 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-24 06:29:28 +00:00
Reid Spencer
dafe55f64b For PR351:
Use the LLVM_ON_UNIX and LLVM_ON_WIN32 #defines to include the implementation
instead of relying upon the "platform" link


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19132 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-24 06:29:17 +00:00
Reid Spencer
ebf8d0ecdf Resurrect this file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19130 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-24 06:03:31 +00:00
Reid Spencer
48a1f4237d Remove these files as they are not being included any more. DynamicLibrary
is now implemented via ltdl.cpp which has its own way of dealing with
the different platforms.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19129 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-24 03:59:46 +00:00
Jeff Cohen
cb652550b6 Fix VC++ compilation error
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19124 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-24 02:38:34 +00:00
Reid Spencer
a36c9a4dd3 Put CopyFile in the sys namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19122 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-23 22:14:32 +00:00
Jeff Cohen
2e5f445da0 Patch to fix mingw compilation problem contributed by Henrik.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19112 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-23 03:44:40 +00:00
Reid Spencer
78076f6140 Put the CopyFile function explicitly in the sys namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19079 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-21 03:27:08 +00:00
Reid Spencer
a025270b50 Cygwin doesn't like .. through a link, so drop the ..
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19076 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 22:21:41 +00:00
Reid Spencer
8b6628997f Implement GetTimeUsage correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19074 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 21:43:33 +00:00
Reid Spencer
ed5e7bf422 Provide a getrusage based implementation of GetTotalMemoryUsage and use
the ru_maxrss field as an approximation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19072 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 16:33:37 +00:00
Reid Spencer
bc1ee84001 Consistently use the same #if style. Also, fix a bug testing for sbrk(3)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19071 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 16:06:44 +00:00
Jeff Cohen
a1b3d3d24c Keep up with lib/System changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19057 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 03:24:56 +00:00
Reid Spencer
721d9aa060 For PR351:
* Implement GetMallocUsage to get usage of malloc heap
* Implement GetMemoryUsage to get total memory usage of process
* Implement GetTimeUsage to get elapsed/user/system time


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19055 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 00:59:28 +00:00
Reid Spencer
a4775838e2 For PR351:
No need for Unix/SUS/Process.cpp any more, just ifdef it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19054 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 00:59:16 +00:00
Misha Brukman
210b32b16f * Use "" for LLVM include files, not <>
* llvm/Config/alloca.h already #includes config.h
* Minor readability/stylistic changes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19048 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 00:16:38 +00:00
Misha Brukman
6782835604 Use <> for system #include files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19046 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-19 19:27:11 +00:00
Brian Gaeke
5d112c452a Make references to 'struct sigaction' compile under Solaris.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19045 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-19 18:58:11 +00:00
Reid Spencer
2a7d9e98ba For PR351:
Move the functionality of RunProgramWithTimeout into the ExecuteAndWait
function: support a timeout and I/O redirects


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19043 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-19 18:00:44 +00:00
Reid Spencer
41394ec672 For PR351:
Add a needed include.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19042 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-19 18:00:32 +00:00
Jeff Cohen
f8cdb85d05 Fix win32 breakage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19028 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-18 06:42:15 +00:00
Jeff Cohen
b8b836d019 Expository comment submitted by Henrik Bach
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18976 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 04:06:56 +00:00
Reid Spencer
00e8930206 Change the signatures of the destroyFile and destroyDirectory methods to
const because they affect the file system, not the Path object.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18973 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 23:02:10 +00:00
Reid Spencer
24ac21f937 Remove the CFE's lib directory from the bytecode path because LLVM should
be agnostic to the needs of any specific FE.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18969 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 22:22:51 +00:00
Reid Spencer
835b6941fd Remove automatic insertion of CFE's lib directory into the bytecode path
because LLVM should be agnostic to the needs of specific front ends.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18968 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 22:21:42 +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
Jeff Cohen
003485a0b3 Make Win32 TimeValue::toString() re-entrant and work with mingw
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18954 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 04:28:44 +00:00
Jeff Cohen
ab68df02bc Fix VC++ compilation errors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18953 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 04:08:15 +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
Reid Spencer
3b0cc78c60 Add the getMagicNumber method.
Patch contributed by Henrik Bach. Thanks Henrik!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18933 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-14 18:42: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
e2e2411f40 For PR351:
Implement the new environment pointer for ExecuteAndWait


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18928 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-14 04:18:51 +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
79fc924957 Genericize implementation of GetDLLSuffix now that we have LTDL_SHLIB_EXT
available.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18904 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 18:41:28 +00:00
Reid Spencer
b0e1887014 Fix a bug where "." or any single character file name doesn't get the
terminating / when setDirectory is called.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18886 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 07:51:52 +00:00
Reid Spencer
3d595cba33 Remove an always false clause from an if statement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18885 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 07:51:07 +00:00
Alkis Evlogimenos
07941b493d Fix a bug where directory names of length one or less where not set
properly (examples: "", ".", "a").


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18883 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 07:41:35 +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
Jeff Cohen
3265369ff5 Fix recent breakage of win32 build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18876 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 06:26:35 +00:00
Reid Spencer
6c4b7bded1 Implement new functions per new interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18866 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 03:03:42 +00:00