Files
archived-llvm/include/llvm/Support
Duncan P. N. Exon Smith fbf768a4d3 Support: Implement StreamingMemoryObject::getPointer
The implementation is fairly obvious.  This is preparation for using
some blobs in bitcode.

For clarity (and perhaps future-proofing?), I moved the call to
JumpToBit in BitstreamCursor::readRecord ahead of calling
MemoryObject::getPointer, since JumpToBit can theoretically (a) read
bytes, which (b) invalidates the blob pointer.

This isn't strictly necessary the two memory objects we have:

  - The return of RawMemoryObject::getPointer is valid until the memory
    object is destroyed.

  - StreamingMemoryObject::getPointer is valid until the next chunk is
    read from the stream.  Since the JumpToBit call is only going ahead
    to a word boundary, we'll never load another chunk.

However, reordering makes it clear by inspection that the blob returned
by BitstreamCursor::readRecord will be valid.

I added some tests for StreamingMemoryObject::getPointer and
BitstreamCursor::readRecord.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264549 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-27 23:00:59 +00:00
..
2016-02-15 04:30:37 +00:00
2015-11-17 19:00:52 +00:00
2016-02-01 10:39:24 +00:00
2016-03-11 20:20:25 +00:00
2016-01-22 19:58:18 +00:00
2016-02-26 17:01:45 +00:00
2016-01-18 21:01:50 +00:00
2016-02-09 13:28:44 +00:00
2015-08-08 18:27:36 +00:00
2015-08-10 04:22:09 +00:00
2013-05-21 20:36:13 +00:00
2015-08-10 04:22:09 +00:00
2015-08-10 04:22:09 +00:00
2016-03-27 20:50:05 +00:00
2015-08-18 22:31:24 +00:00