summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Reader/Deserialize.cpp
Commit message (Collapse)AuthorAgeFilesLines
* revert r61368.Zhongxing Xu2008-12-231-1/+1
| | | | llvm-svn: 61369
* Remove dead code.Zhongxing Xu2008-12-231-1/+1
| | | | llvm-svn: 61368
* fix warning when assertion disabled.Chris Lattner2008-06-211-1/+1
| | | | llvm-svn: 52588
* Fixed buffer overflow reported by Argiris Kirtzidis.Ted Kremenek2008-02-231-1/+1
| | | | llvm-svn: 47517
* Use empty() instead of comparing size() with zero.Dan Gohman2008-01-291-1/+1
| | | | llvm-svn: 46514
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Modified Deserializer::ReadCStr to allow C-strings to be read into aTed Kremenek2007-12-171-3/+10
| | | | | | std::vector<char> starting from any index in the vector. llvm-svn: 45129
* Fixed subtle bug in Deserializer::JumpTo when jumping when the block-nestingTed Kremenek2007-11-301-9/+27
| | | | | | | information matching did not exactly match the underlying stream's scoping information. llvm-svn: 44470
* Removed debug #define that was accidentally checked in while debuggingTed Kremenek2007-11-141-3/+1
| | | | | | | | | the deserializer. Fixed assertion when "stream jumping" in the deserializer to properly function when we have reached the end of the stream. llvm-svn: 44124
* Added two new overloaded versions of BatchEmitOwnedPtrs andTed Kremenek2007-11-141-5/+13
| | | | | | BatchReadOwnedPtrs. llvm-svn: 44105
* Added versions of ReadPtr that takes an explicit SerializedPtrID. This allowsTed Kremenek2007-11-121-4/+6
| | | | | | | | | | | | clients of the Deserializer to read the pointer ID before they are ready to deserialize the object (which can mean registering a pointer reference with the backpatcher). Changed some methods that took an argument "SerializedPtrID" to "const SerializedPtrID&" (pass-by-reference). This is to accommodate a future revision of SerializedPtrID where it may be much fatter than an unsigned integer. llvm-svn: 44021
* Updated method signature to conform with the typedef in the method prototype.Ted Kremenek2007-11-101-1/+1
| | | | llvm-svn: 43982
* Added "random access" to the Deserializer to allow a client to jump to anyTed Kremenek2007-11-101-8/+116
| | | | | | | | serialized block in the bitstream, including a block in an entirely different nesting than the current block. This is useful for deserializing objects from a bitstream in an order different from the order that they were serialized. llvm-svn: 43973
* Updated Deserializer class to provide more information about the currentTed Kremenek2007-11-091-48/+97
| | | | | | | | | block that is being visited in the bitstream. The client can also now skip blocks before reading them, and query the current abbreviation number as seen from the perspective of the Deserializer. This allows the client to be more interactive in the deserialization process (if they so choose). llvm-svn: 43916
* Added typedef "SerializedPtrID" to represent the pointer handle written to diskTed Kremenek2007-11-081-4/+25
| | | | | | | | | | | instead of just using "unsigned". This gives us more flexibility in changing the definition of the handle later, and is more self-documenting. Added tracking of block stack in the Deserializer. Now clients can query if they are still within a block using the methods GetCurrentBlockLocation() and FinishedBlock(). llvm-svn: 43903
* Implemented serialization of signed integers.Ted Kremenek2007-11-071-0/+15
| | | | llvm-svn: 43828
* Augmented ReadPtr and ReadOwnedPtr to control whether or not a pointer is ↵Ted Kremenek2007-11-061-1/+4
| | | | | | | | allowed to be backpatched or can be registered with the deserializer to backpatch other pointers. llvm-svn: 43783
* Added support for processing abbreviations in the Deserializer.Ted Kremenek2007-11-061-2/+19
| | | | | | Added some #ifdef-controlled messages for debugging backpatching. llvm-svn: 43771
* Added support in serializer and deserializer to create arbitrary blocks.Ted Kremenek2007-11-051-1/+15
| | | | | | Added detection of end-of-stream in deserializer. llvm-svn: 43736
* Added default creation of root-level block by bitstream serializer.Ted Kremenek2007-11-051-3/+22
| | | | llvm-svn: 43732
* Removed ReadVal from SerializeTrait<T>, and also removed it fromTed Kremenek2007-11-011-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Deserializer. There were issues with Visual C++ barfing when instantiating SerializeTrait<T> when "T" was an abstract class AND SerializeTrait<T>::ReadVal was *never* called: template <typename T> struct SerializeTrait { <SNIP> static inline T ReadVal(Deserializer& D) { T::ReadVal(D); } <SNIP> }; Visual C++ would complain about "T" being an abstract class, even though ReadVal was never instantiated (although one of the other member functions were). Removing this from the trait is not a big deal. It was used hardly ever, and users who want "read-by-value" deserialization can simply call the appropriate methods directly instead of relying on trait-based-dispatch. The trait dispatch for serialization/deserialization is simply sugar in many cases (like this one). llvm-svn: 43624
* Rewrote backpatcher. Backpatcher now stores the "has final pointer"Ted Kremenek2007-11-011-21/+19
| | | | | | | | | | | flag in the **key** of the backpatch map, as opposed to the mapped value which contains either the final pointer, or a pointer to a chain of pointers that need to be backpatched. The bit flag was moved to the key because we were erroneously assuming that the backpatched pointers would be at an alignment of >= 2 bytes, which obviously doesn't work for character strings. Now we just steal the bit from the key. llvm-svn: 43595
* constified several pointer arguments for methods in the Deserializer.Ted Kremenek2007-10-311-3/+3
| | | | llvm-svn: 43583
* Implemented deserialization of references. References are handledTed Kremenek2007-10-311-1/+13
| | | | | | | | | | | | | just like pointers, except that they cannot be backpatched. This means that references are essentially non-owning pointers where the referred object must be deserialized prior to the reference being deserialized. Because of the nature of references, this ordering of objects is always possible. Fixed a bug in backpatching code (returning the backpatched pointer would accidentally include a bit flag). llvm-svn: 43570
* Fixed warning concerning implicit conversion from a NULL pointerTed Kremenek2007-10-291-1/+1
| | | | | | constant to an unsigned int. We now just directly assign the literal 0. llvm-svn: 43459
* Fixed assertion in Deserializer::~Deserializer that checks forTed Kremenek2007-10-281-2/+6
| | | | | | pointers that were not backpatched (previously checked the wrong invariant). llvm-svn: 43425
* Updated backpatching logic during object deserialization to performTed Kremenek2007-10-281-24/+38
| | | | | | | | eager backpatching instead of waithing until all objects have been deserialized. This allows us to reduce the memory footprint needed for backpatching. llvm-svn: 43422
* Updated backpatching during object deserialization to support "smart"Ted Kremenek2007-10-251-1/+3
| | | | | | pointers that employ unused bits in a pointer to store extra data. llvm-svn: 43373
* Disambiguated variable name to comply with VC++'s archaic variable scoping ↵Hartmut Kaiser2007-10-251-5/+5
| | | | | | rules. llvm-svn: 43369
* Added special treatment of serializing NULL pointers.Ted Kremenek2007-10-251-0/+5
| | | | llvm-svn: 43357
* Implemented prototype serialization of pointers, including supportTed Kremenek2007-10-251-2/+52
| | | | | | | | for backpatching. Added Deserialize::ReadVal. llvm-svn: 43319
* Split Serialization.h into separate headers: Serialize.h andTed Kremenek2007-10-241-17/+26
| | | | | | | Deserialize.h Serialization.h now includes trait speciailizations for unsigned long, etc. llvm-svn: 43307
* Added preliminary implementation of generic object serialization to bitcode.Ted Kremenek2007-10-231-0/+83
llvm-svn: 43261
OpenPOWER on IntegriCloud