<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 27, 2015 at 11:25 AM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">> Could we take the parameter by reference instead of pointer?<br>
<br>
</span>That gets into the wonderful world of TargetRegistry.h.<br>
<br>
The MCAsmStreamer takes ownership of this, so the natural way would be<br>
to pass a std::unique_ptr. But TargetRegistry.h would have to call<br>
std::move, and to do that it would have to know the size of the<br>
instprinter instead of just having a forward declaration.<br>
<br>
But TargetRegistry.h is in Support, so it cannot include a header from MC.<br>
<br>
Getting ownership of something passed by reference would be even more<br>
confusing IMHO.<br></blockquote><div><br>Ah, right - I think I remember trying to unique_ptrify this before... :/ I should leave more breadcrumbs/comments.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Cheers,<br>
Rafael<br>
</blockquote></div><br></div></div>