[PATCH] D13193: Add an MCTargetMachine and use it to configure MCAsmInfo

Eric Christopher via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 17 04:17:41 PDT 2015


On Fri, Oct 16, 2015 at 7:23 AM Daniel Sanders <daniel.sanders at imgtec.com>
wrote:

> dsanders added a comment.
>
> 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?
>
>
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.


> > ... is that MCTargetMachine holds an owning pointer to MCCodeGenInfo,
> MCAsmInfo ...
>
>
> 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.
>
>
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.

-eric


>
> http://reviews.llvm.org/D13193
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151017/d81f68b3/attachment.html>


More information about the llvm-commits mailing list