[PATCH] TargetInfo: Use DataLayout to compute pointer width in getPointerWidth()

Rafael EspĂ­ndola rafael.espindola at gmail.com
Wed Jun 25 14:22:47 PDT 2014

On 25 June 2014 17:19, Alp Toker <alp at nuanti.com> wrote:
> On 26/06/2014 00:13, Rafael EspĂ­ndola wrote:
>>> Hi Tom,
>>> TargetInfo is meant to be independent of DataLayout IIRC, otherwise
>>> frontend
>>> functionality like semantic analysis would become dependent on backend
>>> targets.
>> Well, on the target datalayout. That is currently constructed in
>> clang. My only concern is if this would make it harder to change clang
>> in the future to use llvm provided datalayouts.
> Oh, this is a clang DataLayout? If there's no backend dependency it's
> probably OK.
> It's interesting no other target has done it this way before, but I guess if
> it can be tested with a -fsyntax-only test that doesn't have REQUIRES:
> r600-registered-target there's no fundamental problem

I agree.


More information about the cfe-commits mailing list