aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Bytecode
Commit message (Collapse)AuthorAgeFilesLines
* Just rethrow previous exception instead of making a new oneChris Lattner2003-09-261-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8718 91177308-0d34-0410-b5e6-96231b3b80d8
* Define the instance variable Buffer, not the automatic variable Buffer.Chris Lattner2003-09-251-3/+2
| | | | | | | This was causing us to munmap random stuff, which is obviously bad. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8709 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix alignment problemChris Lattner2003-09-241-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8707 91177308-0d34-0410-b5e6-96231b3b80d8
* Actually assign the string correctly through the std::string pointer.Misha Brukman2003-09-241-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8704 91177308-0d34-0410-b5e6-96231b3b80d8
* * Eliminate BytecodeBufferReader::Length member variableMisha Brukman2003-09-241-26/+7
| | | | | | | | * Kill unused ALIN_PTRS #define * Set the error string if user passed it in to be compatible with former API git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8701 91177308-0d34-0410-b5e6-96231b3b80d8
* Added code that ensures that we pass the beginning of the data buffer toJohn Criswell2003-09-231-1/+1
| | | | | | | the parsing routines regardless of whether the buffer is re-aligned or not. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8693 91177308-0d34-0410-b5e6-96231b3b80d8
* Stop returning bool and pass Instruction by reference;Misha Brukman2003-09-232-135/+146
| | | | | | | return std::auto_ptr and use exceptions git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8684 91177308-0d34-0410-b5e6-96231b3b80d8
* Suggestions made by Chris:Misha Brukman2003-09-231-10/+14
| | | | | | | | | | * Instead of a #define, use inline function * Fix the name on the #define, errr... now inline function to be more logical: it doesn't CHECK the alignment, it PERFORMS the alignment * To get string name of a Type*, use getDescription(), not getName() git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8683 91177308-0d34-0410-b5e6-96231b3b80d8
* * Group class definitions & implementations togetherMisha Brukman2003-09-231-58/+110
| | | | | | | | | * 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8682 91177308-0d34-0410-b5e6-96231b3b80d8
* * Constantify arguments to copy functionMisha Brukman2003-09-231-8/+4
| | | | | | | * Stop using a #define, make it an inline if statement git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8678 91177308-0d34-0410-b5e6-96231b3b80d8
* Removed no longer used member variable.Misha Brukman2003-09-221-4/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8677 91177308-0d34-0410-b5e6-96231b3b80d8
* Added file header comment.Misha Brukman2003-09-221-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8675 91177308-0d34-0410-b5e6-96231b3b80d8
* Update file header for renamed fileChris Lattner2003-09-222-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8673 91177308-0d34-0410-b5e6-96231b3b80d8
* * Cleaned up code:Misha Brukman2003-09-224-340/+443
| | | | | | | | | | - 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8671 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a spello Misha made while fixing one of my appostrificationsChris Lattner2003-09-151-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8510 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed spelling and grammar.Misha Brukman2003-09-117-12/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8489 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bugChris Lattner2003-09-081-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8410 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for the unwind instructionChris Lattner2003-09-081-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8408 91177308-0d34-0410-b5e6-96231b3b80d8
* Read volatile loads/storesChris Lattner2003-09-081-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8401 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a gross hack that was there to support bytecode files that are over a ↵Chris Lattner2003-09-083-65/+12
| | | | | | | | | year old. If you still have these suckers laying around, you have GOT to rebuild them. geeze. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8395 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for writing volatile load/storesChris Lattner2003-09-081-22/+22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8394 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix reading of invoke instrsChris Lattner2003-09-051-22/+23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8365 91177308-0d34-0410-b5e6-96231b3b80d8
* Whoa, we were misreading invoke instructions "normal" destinations quite badly.Chris Lattner2003-09-051-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8363 91177308-0d34-0410-b5e6-96231b3b80d8
* Non-functional changeChris Lattner2003-09-041-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8352 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid printing meaningless numbersChris Lattner2003-09-031-4/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8342 91177308-0d34-0410-b5e6-96231b3b80d8
* Follow the pattern of all other atu'sChris Lattner2003-09-031-6/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8340 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow modules to have 'any' pointer size and endianness. Luckily, we hadChris Lattner2003-08-243-15/+26
| | | | | | | some space for extra flags, so we don't need to bump the revision number. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8118 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename SwitchInst::dest_push_back -> addCaseChris Lattner2003-08-231-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8089 91177308-0d34-0410-b5e6-96231b3b80d8
* Spell `necessary' correctly.Misha Brukman2003-08-181-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7944 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove redundant const qualifiers from cast<> expressionsChris Lattner2003-07-232-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7253 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove explicit const qualifiersChris Lattner2003-07-231-10/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7245 91177308-0d34-0410-b5e6-96231b3b80d8
* The word `separate' only has one `e'.Misha Brukman2003-07-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7173 91177308-0d34-0410-b5e6-96231b3b80d8
* Merged in autoconf branch. This provides configuration via the autoconfJohn Criswell2003-06-304-12/+12
| | | | | | | system. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7014 91177308-0d34-0410-b5e6-96231b3b80d8
* Detemplatize the PATypeHandle class, which was only really instantiated on ↵Chris Lattner2003-06-182-2/+2
| | | | | | 'Type'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6774 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug: Assembler/2003-06-17-InvokeDisassemble.llxChris Lattner2003-06-171-10/+14
| | | | | | | "yes, invoke instructions can have just three arguments" git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6736 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug: Assembler/2003-05-03-BytecodeReaderProblem.llxChris Lattner2003-05-221-16/+25
| | | | | | | | by emitting the type planes before any constants (which could be constant expressions involving undefined types!) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6285 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not assert fail or crash when a bytecode parse fails!Chris Lattner2003-05-222-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6284 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate the uchar typedef, use unsigned char explicitlyChris Lattner2003-05-224-38/+56
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6283 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix Bug: Assembler/2003-05-12-MinIntProblem.llxChris Lattner2003-05-121-9/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6123 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for the new va_arg instructionChris Lattner2003-05-082-5/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6029 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed 'prevalent'.Misha Brukman2003-04-232-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5860 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for reading and writing pointersize/endianness to and from bytecodeChris Lattner2003-04-222-2/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5839 91177308-0d34-0410-b5e6-96231b3b80d8
* Preserve module source information in the ModuleIDChris Lattner2003-04-224-13/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5836 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial support for reading standard .a filesChris Lattner2003-04-192-0/+332
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5820 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for reading unaligned bytecode buffersChris Lattner2003-04-191-0/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5819 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a big bad bug I checked in yesterday :(Chris Lattner2003-04-181-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5807 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support to the bytecode reader/writer for the new linkage typesChris Lattner2003-04-163-20/+48
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5790 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new linkage types to support a real frontendChris Lattner2003-04-162-4/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5786 91177308-0d34-0410-b5e6-96231b3b80d8
* * Change the order that globals and constants are processed inChris Lattner2003-03-191-36/+45
| | | | | | | * Add support for implicit zero initializers git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5750 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes to the V2 bytecode format:Chris Lattner2003-03-193-48/+54
| | | | | | | | | | | | | | | | | | | | | - Null values are implicitly encoded instead of explicitly, this makes things more compact! - More compactly represent ConstantPointerRefs - Bytecode files are represented as: Header|GlobalTypes|GlobalVars/Function Protos|Constants|Functions|SymTab instead of Header|GlobalTypes|Constants|GlobalVars/Function Protos|Functions|SymTab which makes a lot of things simpler. Writer changes: - We now explictly encode versioning information in the bytecode files. - This allows new code to read bytecode files produced by old code, but new bytecode files can have enhancements such as the above. Although this makes the reader a bit more complex (having to deal with old formats), the writer only needs to be able to produce the most recent version. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5749 91177308-0d34-0410-b5e6-96231b3b80d8