[llvm] r200040 - Make ObjectFile ownership of the MemoryBuffer optional.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Jan 24 14:05:10 PST 2014


> Managing MemoryBuffer lifetimes this way seems unsatisfactory. Would it be
> possible to refcount or use some kind of smart pointer?

Binary could hold a OwningPtr<MemoryBuffer> and call take if it is not
owning it, but that seems equivalent.

I would avoid reference counts as much as possible. It is always the
case that the Binary can own it or the caller can.

> Alp.

Cheers,
Rafael



More information about the llvm-commits mailing list