<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 19, 2015 at 11:11 AM, Peter Collingbourne <span dir="ltr"><<a href="mailto:peter@pcc.me.uk" target="_blank">peter@pcc.me.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Thu, Feb 19, 2015 at 11:01:18AM -0800, David Blaikie wrote:<br>
> > +    MCTargetStreamer *createNullTargetStreamer(MCStreamer &S) const {<br>
> ><br>
><br>
> Could/should this (& NullTargetStreamerCtorFn) return by unique_ptr instead?<br>
<br>
</span>The MCStreamer takes ownership of the target streamer on construction<br>
(see include/llvm/MC/MCStreamer.h line 176 and lib/MC/MCStreamer.cpp line<br>
31), so probably not at the moment. It seems reasonable to make the client<br>
responsible for transferring ownership though.<br></blockquote><div><br>Ah, curious.<br><br>Actually it seems I'd got this confused with other changes you'd made to createNullStreamer (which I now see is distinct from this createNull/Target/Streamer) - which seems to return ownership via raw pointer. But maybe I recall trying to fix that & not being able to due to some layering... I'm not sure.<br><br>- David<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Thanks,<br>
<span class="HOEnZb"><font color="#888888">--<br>
Peter<br>
</font></span></blockquote></div><br></div></div>