[llvm] r264549 - Support: Implement StreamingMemoryObject::getPointer

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 28 07:05:58 PDT 2016


> The way bitcode gets read in practice could make that a little complicated.  If there's a blob inside a function and we skip past it (without knowing it's a blob) then it could end up in multiple allocations.  When someone comes back and calls getPointer then StreamingMemoryObject would have to split it up after the fact and insert into (e.g.) near the beginning of that vector.

The skip would still be a read from the point of view of
StreamingMemoryObject, so the entire function with the blob in it
would be in a single buffer/entry in the vector.

I think with that we should be able to clean the BitstreamReader to
always take a MemoryObject instead of having two modes.

Cheers,
Rafael


More information about the llvm-commits mailing list