[patch] Pass a MemoryBufferRef when we can avoid taking ownership

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue Aug 26 11:22:14 PDT 2014


Hi David,

The attached patch simplifies a few interfaces that don't need to take
ownership of a buffer.

For example, both parseAssembly and parseBitcodeFile will parse the
entire buffer before returning. There is no need to take ownership.

Using a MemoryBufferRef makes it obvious in the type signature that
there is no ownership transfer.

Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.patch
Type: text/x-patch
Size: 17543 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140826/829efdf0/attachment.bin>


More information about the llvm-commits mailing list