Reid Spencer
6cb551b279
For PR351:
...
Move the functionality of RunProgramWithTimeout into the ExecuteAndWait
function: support a timeout and I/O redirects
llvm-svn: 19043
2004-12-19 18:00:44 +00:00
Reid Spencer
72d1627d16
For PR351:
...
Add a needed include.
llvm-svn: 19042
2004-12-19 18:00:32 +00:00
Reid Spencer
e56242780c
Change the signatures of the destroyFile and destroyDirectory methods to
...
const because they affect the file system, not the Path object.
llvm-svn: 18973
2004-12-15 23:02:10 +00:00
Reid Spencer
879f11df3d
Remove automatic insertion of CFE's lib directory into the bytecode path
...
because LLVM should be agnostic to the needs of specific front ends.
llvm-svn: 18968
2004-12-15 22:21:42 +00:00
Reid Spencer
98ce23ffb0
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.
llvm-svn: 18961
2004-12-15 08:32:45 +00:00
Reid Spencer
f66d93239e
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.
llvm-svn: 18947
2004-12-15 01:50:13 +00:00
Reid Spencer
cdefe0aebc
For PR351:
...
Implement the new environment pointer for ExecuteAndWait
llvm-svn: 18928
2004-12-14 04:18:51 +00:00
Reid Spencer
94bf2265df
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.
llvm-svn: 18907
2004-12-13 19:59:50 +00:00
Reid Spencer
a85abc23d5
Remove an always false clause from an if statement.
...
llvm-svn: 18885
2004-12-13 07:51:07 +00:00
Alkis Evlogimenos
5b1a05fb7c
Fix a bug where directory names of length one or less where not set
...
properly (examples: "", ".", "a").
llvm-svn: 18883
2004-12-13 07:41:35 +00:00
Reid Spencer
0230a5eead
* Add a std::ostream inserter for sys::Path
...
* Correct the std::string constructor to take a const reference.
llvm-svn: 18877
2004-12-13 06:57:15 +00:00
Reid Spencer
9b155dc4c0
For PR351: \
...
* Remove IsLibrary and GetLibraryPath, replaced by FindLibrary in ../Path.cpp \
* Implement GetSystemLibraryPaths and GetBytecodeLibraryPaths, instead of the \
GetSystemLibraryPath1 and GetSystemLibraryPath2 methods
llvm-svn: 18862
2004-12-13 03:00:51 +00:00
Reid Spencer
35f16dd40b
Make the size() method const
...
llvm-svn: 18852
2004-12-13 02:58:51 +00:00
Reid Spencer
5ccfd5a48b
Path::get -> Path::toString
...
llvm-svn: 18785
2004-12-11 00:14:15 +00:00
Chris Lattner
6ef473f53c
Make this work with the ICC compiler, contributed by Bjørn Wennberg
...
llvm-svn: 18626
2004-12-08 16:10:52 +00:00
Reid Spencer
f473185cbc
Fix seriously broken implementation of GetMagicNumber.
...
llvm-svn: 18422
2004-12-02 09:09:48 +00:00
Reid Spencer
72a7457a90
Implement the default constructor which causes the current program to be
...
opened as if it was a dynamic library so its symbols can be searched too.
llvm-svn: 18341
2004-11-29 10:39:46 +00:00
Reid Spencer
4a763ca854
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.
llvm-svn: 17940
2004-11-18 04:33:39 +00:00
Reid Spencer
1b13a7cdb8
* Use low-level unix I/O interface since we're on Unix.
...
* Don't use variable length arrays (replaced with alloca)
llvm-svn: 17901
2004-11-16 17:14:08 +00:00
Reid Spencer
09e9f2a37b
Per code review:
...
* get rid of (void) construct in function declarations
* make toString a const member
* add a default implementation of toString for Win32
llvm-svn: 17873
2004-11-16 06:22:17 +00:00
Reid Spencer
91f505eae9
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.
llvm-svn: 17872
2004-11-16 06:15:19 +00:00
Reid Spencer
315efa1a84
Make it actually compile on Solaris.
...
llvm-svn: 17815
2004-11-15 04:42:44 +00:00
Reid Spencer
bfb7b3eb68
Consolidate the implementation of TimeValue::now() for Unix to use the
...
seemingly ubiquitous gettimeofday(3) call.
llvm-svn: 17813
2004-11-15 04:36:35 +00:00
Reid Spencer
7705ec231c
Implement functionality suggested from code review: getStatusInfo should
...
returnn false if the file doesn't exist rather than throw ane exception.
llvm-svn: 17809
2004-11-14 23:30:38 +00:00
Reid Spencer
2dd5e71836
Forget strerror_r, it causes problems. Fix later when threading matters
...
llvm-svn: 17783
2004-11-14 22:10:54 +00:00
Reid Spencer
0d455997f8
Implement the toString method
...
llvm-svn: 17782
2004-11-14 22:10:08 +00:00
Reid Spencer
26e2bd44f2
Update for prototype changes
...
llvm-svn: 17781
2004-11-14 22:09:22 +00:00
Reid Spencer
c1d474f069
* Implement getDirectoryContents * Implement getStatusInfo * Implement setStatusInfo * Implement renameFile
...
llvm-svn: 17780
2004-11-14 22:08:36 +00:00
Reid Spencer
60c72a339b
Fix bugs in class invariant
...
llvm-svn: 17779
2004-11-14 22:07:50 +00:00
Reid Spencer
fb1f7357c2
* Implement getStatusInfo for getting stat(2) like information
...
* Implement createTemporaryFile for mkstemp(3) functionality
* Fix isBytecodeFile to accept llvc magic # (compressed) as bytecode.
llvm-svn: 17654
2004-11-09 20:26:31 +00:00
Reid Spencer
0c6a283b2a
Stop propagating method names that violate the coding standard
...
llvm-svn: 17498
2004-11-05 22:15:36 +00:00
Reid Spencer
57cbe39d1e
Change Library Names Not To Conflict With Others When Installed
...
llvm-svn: 17286
2004-10-27 23:18:45 +00:00
Brian Gaeke
c5a630bd3c
Must include sys/stat.h before declaring a 'struct stat'
...
llvm-svn: 16728
2004-10-05 18:46:59 +00:00
Reid Spencer
abb04cfc79
Adjust sys/stat.h inclusion so its only for SunOS.
...
llvm-svn: 16686
2004-10-05 00:56:46 +00:00
Tanya Lattner
c3ef3cc7e5
Added a couple of includes to get this to compile on Sparc.
...
llvm-svn: 16685
2004-10-05 00:51:26 +00:00
Chris Lattner
9895937618
Solaris doesn't have MAP_FILE.
...
llvm-svn: 16682
2004-10-05 00:46:21 +00:00
Reid Spencer
161a459d42
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.
llvm-svn: 16649
2004-10-04 11:08:32 +00:00
Reid Spencer
1cc1994edf
Added stub implementations of TimeValue concept for remaining platforms.
...
llvm-svn: 16513
2004-09-25 05:03:54 +00:00
Reid Spencer
36e3cbfd3b
Get rid of file descriptor leak in create_file.
...
llvm-svn: 16395
2004-09-18 19:25:11 +00:00
Reid Spencer
16b7bad55e
Allow "bc" as suffix for bytecode files.
...
llvm-svn: 16381
2004-09-16 16:36:10 +00:00
Reid Spencer
df05ec7e0d
Implement the GetLibraryPath function.
...
llvm-svn: 16323
2004-09-14 00:16:39 +00:00
Reid Spencer
07369430c4
Clean up the interface and implementation of sys::Program so that it is
...
cleanly dissociated from the sys::Path class.
llvm-svn: 16315
2004-09-13 21:48:44 +00:00
Reid Spencer
2896c95bca
Provide a generic Unix implementation of the Memory concept.
...
llvm-svn: 16291
2004-09-11 04:57:25 +00:00
Reid Spencer
33b9d77b89
Provide a generic unix implementation of the Process abstraction.
...
llvm-svn: 16290
2004-09-11 04:56:56 +00:00
Reid Spencer
ae9bbda50a
Implemented support for detecting file types by magic number, stripping
...
path and suffix to leave basename, and getting the DLL suffix.
llvm-svn: 16289
2004-09-11 04:55:08 +00:00
Reid Spencer
2d20d765d8
Implementation of Process concept for SUSv2 platforms.
...
llvm-svn: 16288
2004-09-11 04:54:06 +00:00
Reid Spencer
7c16caa336
Changes For Bug 352
...
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/.
llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Reid Spencer
b14809c51d
Actually define PreventCoreFiles in the sys namespace.
...
llvm-svn: 16125
2004-08-31 17:53:41 +00:00
Reid Spencer
4f48470d84
Add a new abstraction, SysConfig for platform independent system
...
configuration calls. Right now this just contains PreventCoreFiles so that
bugpoint can by platform independent.
llvm-svn: 16124
2004-08-31 17:43:29 +00:00
Reid Spencer
79d4c3d5db
Move the GetTemporaryDirectory function from "generic Unix" to platform
...
specific.
llvm-svn: 16119
2004-08-30 21:46:55 +00:00
Reid Spencer
f98fff36ef
Add inclusion of assert.h
...
llvm-svn: 16118
2004-08-30 16:03:54 +00:00
Reid Spencer
023637eb38
Add a declaration of environ global for Darwin
...
llvm-svn: 16100
2004-08-29 20:10:07 +00:00
Reid Spencer
2f209c4452
Include some additional header files.
...
Fix the banner length.
llvm-svn: 16086
2004-08-29 19:24:20 +00:00
Reid Spencer
3d7a614ec7
Initial platform independent implementation of operating system concept
...
of "Signals" (cleanup after fatal errors).
llvm-svn: 16085
2004-08-29 19:22:48 +00:00
Reid Spencer
76b83a1869
Initial commit of an platform-indepdendent implementation for the
...
"Program" operating system concept (find and execute programs).
llvm-svn: 16084
2004-08-29 19:20:41 +00:00
Reid Spencer
6df221d50a
Revise the design of the Path concept per peer review. Too many changes to
...
note individually but these essence of it is to not derive from
std::string, clarify the interface, and provide better documentation.
There is now also (untested) implementations for AIX, Darwin, and SunOS.
llvm-svn: 16078
2004-08-29 05:24:01 +00:00
Reid Spencer
30e25f33f7
Fix a typo.
...
llvm-svn: 16055
2004-08-26 07:43:33 +00:00
Reid Spencer
b3f342c877
Add a README explaining the intended content of this directory.
...
llvm-svn: 16053
2004-08-26 05:58:20 +00:00
Reid Spencer
814ba578ba
Initial implementation of the Path operating system concept.
...
llvm-svn: 16048
2004-08-25 06:20:07 +00:00