[PATCH] D23086: [OpenCL] Generate concrete struct type for ndrange_t

Yaxun Liu via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 5 10:41:04 PDT 2016

yaxunl added a comment.

In https://reviews.llvm.org/D23086#507055, @majnemer wrote:

> This approach seems wrong to me.
> Instead, why not just make `ndrange_t` a typedef of a real struct in `Sema::Initialize`?

ndrange_t is an OpenCL builtin type and the spec does not define its layout. There are sema checks which requires to check if a type is ndrange_t. How to do the check if it is defined as a typedef of a common struct type?

How about implement it as a child class of Type then typedef it?



More information about the cfe-commits mailing list