Rebasing against trunk does not appear to have caused any changes to the
patch, but here is the change in a single patch.
Thanks!
On 07/21/2014 04:18 PM, Eli Bendersky wrote:
On Mon, Jul 21, 2014 at 1:16 PM, Paul Fox <[email protected]
<mailto:[email protected]>> wrote:
What is the procedure for getting this merged? Is any further
action required on my part? I haven't been able to find specifics
on this process beyond posting patches to this list for review.
Paul, rebase your patches vs. latest trunk and then I can commit it
for you.
Eli
On 06/27/2014 12:02 PM, Eli Bendersky wrote:
LGTM
On Fri, Jun 27, 2014 at 8:26 AM, Paul Fox <[email protected]
<mailto:[email protected]>> wrote:
Here are initial patches that expose the inheritable
attributes for OpenCL in libclang, including the python bindings.
I initially posted these on the dev mailing list, but since
they received no response, I presume that this list is a
better place for them.
As far as I can tell, since the address space attributes are
type attributes, exposing them will require adding to the
libclang API. Along these lines, it might be useful to have a
generalized way to query type attributes so that more
semantic analysis can be done through libclang. Any thoughts
on this?
Paul Fox
_______________________________________________
cfe-commits mailing list
[email protected] <mailto:[email protected]>
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
diff --git bindings/python/clang/cindex.py bindings/python/clang/cindex.py
index 517b3c1..b9bc80b 100644
--- bindings/python/clang/cindex.py
+++ bindings/python/clang/cindex.py
@@ -1086,6 +1086,11 @@ CursorKind.CUDACONSTANT_ATTR = CursorKind(412)
CursorKind.CUDADEVICE_ATTR = CursorKind(413)
CursorKind.CUDAGLOBAL_ATTR = CursorKind(414)
CursorKind.CUDAHOST_ATTR = CursorKind(415)
+CursorKind.OPENCL_KERNEL_ATTR = CursorKind(416)
+CursorKind.OPENCL_IMAGE_ACCESS_ATTR = CursorKind(417)
+CursorKind.REQD_WORK_GROUP_SIZE_ATTR = CursorKind(418)
+CursorKind.WORK_GROUP_SIZE_HINT_ATTR = CursorKind(419)
+CursorKind.VEC_TYPE_HIND_ATTR = CursorKind(420)
###
# Preprocessing
diff --git include/clang-c/Index.h include/clang-c/Index.h
index f69f567..062cf8f 100644
--- include/clang-c/Index.h
+++ include/clang-c/Index.h
@@ -2228,7 +2228,12 @@ enum CXCursorKind {
CXCursor_CUDADeviceAttr = 413,
CXCursor_CUDAGlobalAttr = 414,
CXCursor_CUDAHostAttr = 415,
- CXCursor_LastAttr = CXCursor_CUDAHostAttr,
+ CXCursor_OpenCLKernelAttr = 416,
+ CXCursor_OpenCLImageAccessAttr = 417,
+ CXCursor_ReqdWorkGroupSizeAttr = 418,
+ CXCursor_WorkGroupSizeHintAttr = 419,
+ CXCursor_VecTypeHintAttr = 420,
+ CXCursor_LastAttr = CXCursor_VecTypeHintAttr,
/* Preprocessing */
CXCursor_PreprocessingDirective = 500,
diff --git tools/libclang/CIndex.cpp tools/libclang/CIndex.cpp
index fc8703a..a019829 100644
--- tools/libclang/CIndex.cpp
+++ tools/libclang/CIndex.cpp
@@ -3997,6 +3997,16 @@ CXString clang_getCursorKindSpelling(enum CXCursorKind Kind) {
return cxstring::createRef("attribute(global)");
case CXCursor_CUDAHostAttr:
return cxstring::createRef("attribute(host)");
+ case CXCursor_OpenCLKernelAttr:
+ return cxstring::createRef("kernel");
+ case CXCursor_OpenCLImageAccessAttr:
+ return cxstring::createRef("image access");
+ case CXCursor_ReqdWorkGroupSizeAttr:
+ return cxstring::createRef("attribute(reqd_work_group_size)");
+ case CXCursor_WorkGroupSizeHintAttr:
+ return cxstring::createRef("attribute(work_group_size_hint)");
+ case CXCursor_VecTypeHintAttr:
+ return cxstring::createRef("attribute(vec_type_hint)");
case CXCursor_PreprocessingDirective:
return cxstring::createRef("preprocessing directive");
case CXCursor_MacroDefinition:
diff --git tools/libclang/CXCursor.cpp tools/libclang/CXCursor.cpp
index 4321903..70511b7 100644
--- tools/libclang/CXCursor.cpp
+++ tools/libclang/CXCursor.cpp
@@ -57,6 +57,11 @@ static CXCursorKind GetCursorKind(const Attr *A) {
case attr::CUDADevice: return CXCursor_CUDADeviceAttr;
case attr::CUDAGlobal: return CXCursor_CUDAGlobalAttr;
case attr::CUDAHost: return CXCursor_CUDAHostAttr;
+ case attr::OpenCLKernel: return CXCursor_OpenCLKernelAttr;
+ case attr::OpenCLImageAccess: return CXCursor_OpenCLImageAccessAttr;
+ case attr::ReqdWorkGroupSize: return CXCursor_ReqdWorkGroupSizeAttr;
+ case attr::WorkGroupSizeHint: return CXCursor_WorkGroupSizeHintAttr;
+ case attr::VecTypeHint: return CXCursor_VecTypeHintAttr;
}
return CXCursor_UnexposedAttr;
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits