Reid Spencer
e0ce1743c6
Adjustments to allow Bytecode Reading to support the BytecodeHandler
...
interface which is called by the reader if a BytecodeHandler is provided.
llvm-svn: 14493
2004-06-29 23:24:14 +00:00
Chris Lattner
61876bd662
Use the new FileUtilities.h API for mapping a file into an address
...
space
llvm-svn: 13864
2004-05-28 00:24:41 +00:00
Chris Lattner
2827a074c2
Use new getFileSize function instead of sys/stat.h directly.
...
llvm-svn: 10650
2003-12-30 07:40:35 +00:00
Chris Lattner
6317315a2f
Factor FDHandle out of the bytecode reader into the FileUtilities.h support
...
routines.
llvm-svn: 10642
2003-12-29 21:35:05 +00:00
Brian Gaeke
94157211b6
Throw better error messages, by calling strerror(errno) when we
...
get an error inside the bytecode reader.
llvm-svn: 10415
2003-12-12 00:47:44 +00:00
Chris Lattner
4c0e027b28
Fine grainify namespacification, #include file that defines the interface!
...
llvm-svn: 10081
2003-11-19 16:06:55 +00:00
Brian Gaeke
d25f86d683
Put all LLVM code into the llvm namespace, as per bug 109.
...
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
John Criswell
b402729b30
Added LLVM project notice to the top of every C++ source file.
...
Header files will be on the way.
llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Chris Lattner
3f700e8e47
* New revised variable argument handling support
...
* More dense bytecode encoding for varargs calls (like printf)
* Eliminated the extremely old bytecode format. rev #0 is now 1.0
llvm-svn: 9220
2003-10-18 05:54:18 +00:00
Misha Brukman
54c766e934
Add separator between different types of readers.
...
llvm-svn: 9183
2003-10-16 21:19:54 +00:00
Misha Brukman
7b758ed3b5
Destroy allocated resources on exception.
...
llvm-svn: 8969
2003-10-08 19:55:47 +00:00
Brian Gaeke
7bd96d6b90
All of our supported operating systems (so far) and FreeBSD technically
...
want you to include <sys/stat.h> for fstat(), struct stat, and friends.
llvm-svn: 8887
2003-10-06 03:30:28 +00:00
Chris Lattner
def80d731a
Rename AbstractModuleProvider -> ModuleProvider, to match the header file name,
...
and because, while the class used by the interface is abstract, the actual
concept is not.
llvm-svn: 8850
2003-10-04 20:14:59 +00:00
Chris Lattner
2b8c4bf029
Do not leak the ModuleProvider if releaseModule() throws.
...
llvm-svn: 8847
2003-10-04 19:19:37 +00:00
Chris Lattner
222df3cfc5
Define the instance variable Buffer, not the automatic variable Buffer.
...
This was causing us to munmap random stuff, which is obviously bad.
llvm-svn: 8709
2003-09-25 04:13:53 +00:00
Chris Lattner
6d9f1022d5
Fix alignment problem
...
llvm-svn: 8707
2003-09-24 22:34:17 +00:00
Misha Brukman
08e8d47b1e
Actually assign the string correctly through the std::string pointer.
...
llvm-svn: 8704
2003-09-24 22:10:47 +00:00
Misha Brukman
c16b33f803
* Eliminate BytecodeBufferReader::Length member variable
...
* Kill unused ALIN_PTRS #define
* Set the error string if user passed it in to be compatible with former API
llvm-svn: 8701
2003-09-24 22:04:02 +00:00
John Criswell
92b65ebb52
Added code that ensures that we pass the beginning of the data buffer to
...
the parsing routines regardless of whether the buffer is re-aligned or not.
llvm-svn: 8693
2003-09-23 21:19:11 +00:00
Misha Brukman
fbb96c627b
* Group class definitions & implementations together
...
* Make sure we align the buffer we're given
* Do not let exceptions propagate when the caller asks for a Module*
* Add doxygenified comments to wrapper functions
llvm-svn: 8682
2003-09-23 16:13:28 +00:00
Misha Brukman
63749f4126
* Constantify arguments to copy function
...
* Stop using a #define, make it an inline if statement
llvm-svn: 8678
2003-09-23 15:09:26 +00:00
Misha Brukman
c68b0950aa
Added file header comment.
...
llvm-svn: 8675
2003-09-22 23:44:46 +00:00
Misha Brukman
41f2a38c92
* Cleaned up code:
...
- no more passing around a string pointer to set errors
- no more returning booleans and checking for errors, we use C++ exceptions
* Broke functionality into 2 new classes, one reads from file, one from a stream
* Implemented lazy function streaming - the parser can read in a function at-a-time
llvm-svn: 8671
2003-09-22 23:38:23 +00:00