[llvm-commits] [PATCH] Move the LowerMEMCPY and LowerMEMCPYCall to a common place
Rafael Espindola
espindola at google.com
Mon Nov 5 12:44:36 PST 2007
> You probably can get away with forward declaring the TargetSubtarget
> class instead of #including here.
Good catch. Will try that.
> If you're going to do this, why not just get rid of Subtarget
> altogether and just use BaseSubtarget? It can be set to 0 for targets
> that don't use it. Then again, it might not be a bad idea to use
> virtual getter/setters here. It already has virtual functions, and
> you're calling virtual functions through this pointer. So... :-)
The problem with using only BaseSubtarget is that X86Subtarget adds a
lot of methods to the base implementation. Because of this the X86
code really expects to see a pointer to the X86Subtarget and not
TargetSubtarget. I.E., a downcast is needed.
> -bw
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
Thanks,
--
Rafael Avila de Espindola
Google Ireland Ltd.
Gordon House
Barrow Street
Dublin 4
Ireland
Registered in Dublin, Ireland
Registration Number: 368047
More information about the llvm-commits
mailing list