[libclc] r211578 - Introduce CLC_VERSION macros v2

Jeroen Ketema j.ketema at imperial.ac.uk
Tue Jun 24 02:46:53 PDT 2014


Author: jketema
Date: Tue Jun 24 04:46:52 2014
New Revision: 211578

URL: http://llvm.org/viewvc/llvm-project?rev=211578&view=rev
Log:
Introduce CLC_VERSION macros v2

Add these out-of-order in clc.h so we can use these in other headers.

v2: Take into account the lack of a definition in OpenCL 1.0

Reviewed-by: Tom Stellard <tom at stellard.net>

Added:
    libclc/trunk/generic/include/clc/clcversion.h
Modified:
    libclc/trunk/generic/include/clc/clc.h

Modified: libclc/trunk/generic/include/clc/clc.h
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/clc.h?rev=211578&r1=211577&r2=211578&view=diff
==============================================================================
--- libclc/trunk/generic/include/clc/clc.h (original)
+++ libclc/trunk/generic/include/clc/clc.h Tue Jun 24 04:46:52 2014
@@ -11,6 +11,9 @@
 /* Function Attributes */
 #include <clc/clcfunc.h>
 
+/* 6.9 Preprocessor Directives and Macros */
+#include <clc/clcversion.h>
+
 /* 6.1 Supported Data Types */
 #include <clc/clctypes.h>
 

Added: libclc/trunk/generic/include/clc/clcversion.h
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/clcversion.h?rev=211578&view=auto
==============================================================================
--- libclc/trunk/generic/include/clc/clcversion.h (added)
+++ libclc/trunk/generic/include/clc/clcversion.h Tue Jun 24 04:46:52 2014
@@ -0,0 +1,8 @@
+#if __OPENCL_VERSION__ >= 110
+#define CLC_VERSION_1_0 100
+#define CLC_VERSION_1_1 110
+#endif
+
+#if __OPENCL_VERSION__ >= 120
+#define CLC_VERSION_1_2 120
+#endif





More information about the cfe-commits mailing list