Commit Graph

113 Commits

Author SHA1 Message Date
Reid Spencer
86ac2dcda1 Fix seriously broken implementation of GetMagicNumber.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18422 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-02 09:09:48 +00:00
Reid Spencer
19cd4a9e6b Implement two new functions: LoadLibraryPermanently and
SearchForAddressOfSymbol.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18355 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-29 13:33:28 +00:00
Reid Spencer
29ae1777c1 We just use ltdl's implementation for this abstraction now. Its portable to
more platforms than LLVM supports.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18352 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-29 12:39:10 +00:00
Reid Spencer
58c8ee1537 Mods for compilation with llvm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18346 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-29 12:04:27 +00:00
Reid Spencer
9c16ed5aea Original version of ltdl.h from libtool 1.5.10
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18345 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-29 12:02:48 +00:00
Reid Spencer
535af2be27 Original version of ltdl.c from libtool 1.5.10
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18344 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-29 12:02:25 +00:00
Reid Spencer
441cc2ab01 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18341 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-29 10:39:46 +00:00
Reid Spencer
7a4538941a Cast the void* handle data member to HMODULE* to keep the VC++ compiler
happy. Thanks to Henrik Bach for pointing this out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18056 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-20 23:30:55 +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
be31d2ad78 * Use low-level unix I/O interface since we're on Unix.
* Don't use variable length arrays (replaced with alloca)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17901 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-16 17:14:08 +00:00
Misha Brukman
e5525438b0 Erase non-applicable Unix comment, this is Win32
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17896 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-16 07:35:32 +00:00
Reid Spencer
56d3cdbd21 Remove useless #include.
Patch contributed by Jeff Cohen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17891 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-16 07:00:23 +00:00
Reid Spencer
9860121890 Simplify code.
Patch contributed by Jeff Cohen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17890 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-16 06:59:53 +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
6b09db550f Provide the ThrowErrno utility.
Patch contributed by Morten Ofstad


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17827 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-15 17:21:57 +00:00
Reid Spencer
abc8650fc0 Adjust implementation to match new interface.
Patch provided by Morten Ofstad


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17826 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-15 17:20:28 +00:00
Reid Spencer
a79a99a1dc Actually get the #include correct so it compiles .. duh.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17817 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-15 04:47:22 +00:00
Reid Spencer
2e83ea5211 Make it actually compile on Solaris.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17815 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-15 04:42:44 +00:00
Reid Spencer
00b5df427f Consolidate the implementation of TimeValue::now() for Unix to use the
seemingly ubiquitous gettimeofday(3) call.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17813 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-15 04:36:35 +00:00
Reid Spencer
2fbf978cb7 Implement functionality suggested from code review: getStatusInfo should
returnn false if the file doesn't exist rather than throw ane exception.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17809 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 23:30:38 +00:00
Reid Spencer
a2a62210f2 Make sure IdentifyFileType is in the sys namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17806 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 23:26:18 +00:00
Alkis Evlogimenos
98bc8ed49b Add missing include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17799 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:37:42 +00:00
Reid Spencer
64a10ce9ad Forget strerror_r, it causes problems. Fix later when threading matters
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17783 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:10:54 +00:00
Reid Spencer
d351871d9b Implement the toString method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17782 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:10:08 +00:00
Reid Spencer
944655922e Update for prototype changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17781 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:09:22 +00:00
Reid Spencer
eaf181550a * Implement getDirectoryContents * Implement getStatusInfo * Implement setStatusInfo * Implement renameFile
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17780 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:08:36 +00:00
Reid Spencer
083507cd3f Fix bugs in class invariant
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17779 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:07:50 +00:00
Reid Spencer
fb9aac85cd Include the correct implementation file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17778 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:07:04 +00:00
Reid Spencer
44cbf36c38 Don't exceed 80 columns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17777 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:06:18 +00:00
Reid Spencer
f37ce99c0a Implement IdentifyFileType function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17776 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:05:32 +00:00
Reid Spencer
4b82681c65 Fix isBytecodeFile to correctly recognized compressed bytecode too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17655 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-09 20:27:23 +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
01a42e40ed Fix a typo: isvalid -> isValid
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17621 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-08 08:27:51 +00:00
Misha Brukman
d8b8912861 Consistently use llvm.cs.uiuc.edu instead of llvm.org
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17548 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-07 00:58:20 +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
Reid Spencer
6cb21d443e Change Library Names Not To Conflict With Others When Installed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17286 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-27 23:18:45 +00:00
Reid Spencer
20ac4e3699 Add EXTRA_DIST for additional files to be distributed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17233 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-26 03:12:11 +00:00
Reid Spencer
cac731ecbe We won't use automake
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17155 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-22 03:35:04 +00:00
Misha Brukman
3567a41307 Fix some grammar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17141 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-19 05:55:54 +00:00
Reid Spencer
86d341b204 Initial automake generated Makefile template
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17136 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-18 23:55:41 +00:00
Misha Brukman
9c02f5c566 AIX does not have mkdtemp() so emulate its behavior using mktemp() and mkdir()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17131 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-18 17:39:45 +00:00
Reid Spencer
83d3aad50e Allow this file to compile on Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16971 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-14 03:33:25 +00:00
Reid Spencer
8af3ed0354 Use __MINGW instead of __MING. Patch contributed by Henrik Bach.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16970 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-14 03:09:02 +00:00
Reid Spencer
7d5ec231ca Get proper BSD #includes for MappedFile implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16969 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-14 03:06:59 +00:00
Reid Spencer
8545fc151e Implementation of MappedFile for Win32. Patch provided by Jeff Cohen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16968 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-14 03:05:59 +00:00
Reid Spencer
d96cb6eaa0 Update to reflect changes in Makefile rules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16950 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-13 11:46:52 +00:00
Reid Spencer
9f41a5fe85 Initial version of automake Makefile.am file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16885 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-10 20:43:57 +00:00
Brian Gaeke
e789a6bfff Must include sys/stat.h before declaring a 'struct stat'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16728 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-05 18:46:59 +00:00
Reid Spencer
f348ccca80 Adjust sys/stat.h inclusion so its only for SunOS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16686 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-05 00:56:46 +00:00