[PATCH] D23086: [OpenCL] Generate concrete struct type for ndrange_t
Yaxun Liu via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 4 10:51:17 PDT 2016
yaxunl added inline comments.
================
Comment at: lib/CodeGen/CGOpenCLRuntime.cpp:43
@@ +42,3 @@
+
+ return llvm::StructType::create(EleTypes, "ndrange_t");
+}
----------------
Anastasia wrote:
> yaxunl wrote:
> > yaxunl wrote:
> > > struct name should be "struct.ndrange_t" to allow library code to access it.
> > Sorry, should be "struct.__ndrange_t" to avoid conflict with builtin type ndrange_t.
> Is there any conflict really? I think it should be Ok to keep "struct.ndrange_t", since we transform it to a struct and don't declare as struct.
ndrange_t is defined as a builtin type in Clang, so library developer cannot implement it as a concrete type, but they can implement `__ndrange_t`. This is similar to the case of `as_type`.
Repository:
rL LLVM
https://reviews.llvm.org/D23086
More information about the cfe-commits
mailing list