[PATCH] D26100: Bitcode: Maintain block info block abbreviations in the BitstreamCursor.

Mehdi Amini via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 28 16:50:15 PDT 2016


You extracted it in “SimpleBitstreamCursor”. The BitstreamCursor inherit from it and is documented as:

`Unlike iterators, BitstreamCursors are heavy-weight objects that should not be passed by value.`


> On Oct 28, 2016, at 4:49 PM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote:
> 
> IIRC, I've added code that takes advantage of BitstreamCursor being a lightweight object.  This seemed like a nice advantage.
> 
> It seems worth discussing this design change on llvm-dev (or, did I miss one there that you can point me at?).
> 
>> On 2016-Oct-28, at 16:38, Mehdi AMINI <mehdi.amini at apple.com> wrote:
>> 
>> mehdi_amini added a comment.
>> 
>> I think this is basically like "merging" responsibility from the bitstream reader and the cursor into the cursor. The cursor isn't just a "position" in the stream with the "bitstreamreader" in charge of keeping the "context".
>> If this is correct, I'm not against it but at least you should reflect it in the class documentation.
>> 
>> Also added Duncan for an extra opinion here.
>> 
>> 
>> https://reviews.llvm.org/D26100
>> 
>> 
>> 
> 



More information about the llvm-commits mailing list