[cfe-commits] [llvm-commits] [Patch] Move TargetData from Target to Support/VMCore

Villmow, Micah Micah.Villmow at amd.com
Thu Oct 4 17:35:05 PDT 2012

Here is an updated version of the patch. If all testing goes well tomorrow and this is version good I'll submit  then.

From: Chandler Carruth [mailto:chandlerc at google.com]
Sent: Thursday, October 04, 2012 5:00 PM
To: Villmow, Micah
Cc: Kim Gräsman; Evan Cheng; llvm-commits at cs.uiuc.edu LLVM; Nadav Rotem; cfe-commits at cs.uiuc.edu cfe
Subject: Re: [cfe-commits] [llvm-commits] [Patch] Move TargetData from Target to Support/VMCore

On Thu, Oct 4, 2012 at 4:48 PM, Villmow, Micah <Micah.Villmow at amd.com<mailto:Micah.Villmow at amd.com>> wrote:
Here is my first run at implementing TargetData with DataLayout.

This should allow all the clients to start switching over to datalayout without any functionality breaking.
There are comments in TargetData that may need updating.

You've made the destructor virtual. I don't think you should need this. The code responsible for creating and destroying these will need to be the last migrated (which is fine) and that code should use TargetData consistently until every client is updated to use DataLayout. Then it can switch, and the virtual destructor won't matter.

Some comments:

+ DataLayout(*reinterpret_cast<const DataLayout*>(&TD))

No, you should just call DataLayout(TD). Derived-to-base conversion will handle the rest.

With those changes, if everything builds and tests pass, LGTM.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121005/4eed6adc/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: implement_targetdata_with_datalayout.txt
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121005/4eed6adc/attachment.txt>

More information about the cfe-commits mailing list