[llvm] r211595 - Pass a unique_ptr<MemoryBuffer> to the constructors in the Binary hierarchy.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Jul 4 15:07:34 PDT 2014


> I agree with that, but reference counting for a few months gives us the
> clean pass-by-pointer interfaces we want in the long run. I'm not at all a
> fan of reference counting, but it's a tool we can use to get where we want.
>
> Making the switch now sets things up so we can introduce proper ownership
> with very little code change.
>
> So this definitely isn't about reference counting vs. something else -- it's
> about taking the first step to achieve the design we ultimately want, but
> always missed out on. My estimate is a 4-6 month timeframe to get there.

Why that long? Moving from the "sometimes owned" to the "always owned"
model was less than one week. Is there really that much more code that
depends on Binary owning the buffer?

That would put the reference counted buffers in one or two releases. I
really don't think we should do that.

Cheers,
Rafael



More information about the llvm-commits mailing list