<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Fri, Oct 16, 2015 at 7:23 AM Daniel Sanders <<a href="mailto:daniel.sanders@imgtec.com">daniel.sanders@imgtec.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">dsanders added a comment.<br>
<br>
Great! I think it's best to abandon this patch and then I'll post a patch that just does the encapsulation step. After that, I'll post another version of this patch starting from that point. Does that sound good?<br>
<br></blockquote><div><br></div><div>Do note that what you're talking about as "the TargetMachine is passed down" only happens for very few objects underneath TargetMachine and that generally things are constructed with the bare minimum of information.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> ... is that MCTargetMachine holds an owning pointer to MCCodeGenInfo, MCAsmInfo ...<br>
<br>
<br>
I've realised I made a mistake here. The pointers ought to be owned by the caller of MCTargetMachine::create*(). This is consistent with TargetMachine.<br>
<br></blockquote><div><br></div><div>I don't agree with this part. I think the ownership hierarchy should be similar to TargetMachine in the way that TargetMachine owns TargetSubtargetInfo and it owns the things that depend upon it.</div><div><br></div><div>-eric</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<a href="http://reviews.llvm.org/D13193" rel="noreferrer" target="_blank">http://reviews.llvm.org/D13193</a><br>
<br>
<br>
<br>
</blockquote></div></div>