1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
llvm-mirror/unittests/Bitcode
Peter Collingbourne a4bf768dd2 IR, Bitcode: Change bitcode reader to no longer own its memory buffer.
Unique ownership is just one possible ownership pattern for the memory buffer
underlying the bitcode reader. In practice, as this patch shows, ownership can
often reside at a higher level. With the upcoming change to allow multiple
modules in a single bitcode file, it will no longer be appropriate for
modules to generally have unique ownership of their memory buffer.

The C API exposes the ownership relation via the LLVMGetBitcodeModuleInContext
and LLVMGetBitcodeModuleInContext2 functions, so we still need some way for
the module to own the memory buffer. This patch does so by adding an owned
memory buffer field to Module, and using it in a few other places where it
is convenient.

Differential Revision: https://reviews.llvm.org/D26384

llvm-svn: 286214
2016-11-08 06:03:43 +00:00
..
BitReaderTest.cpp IR, Bitcode: Change bitcode reader to no longer own its memory buffer. 2016-11-08 06:03:43 +00:00
BitstreamReaderTest.cpp Bitcode: Decouple block info block state from reader. 2016-11-08 04:17:11 +00:00
BitstreamWriterTest.cpp BitcodeWriter: Simplify and test writing blobs, NFC 2016-03-27 23:04:04 +00:00
CMakeLists.txt BitcodeWriter: Simplify and test writing blobs, NFC 2016-03-27 23:04:04 +00:00