From 575fb84cc389bba5f9182b41f9b85f200cee4697 Mon Sep 17 00:00:00 2001 From: Jeroen Ketema Date: Thu, 26 Jun 2014 15:26:38 +0000 Subject: [PATCH] OpenCL 1.1 does not define CL_VERSION_1_2 so use hardcoded number instead Otherwise the test evaluates to true on OpenCL 1.1 and earlier. Since we therefore cannot use the CL_VERSION_?_? macros move them to the proper position in the top-level header. llvm-svn: 211787 --- libclc/generic/include/clc/clc.h | 6 +++--- libclc/generic/include/clc/float/definitions.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libclc/generic/include/clc/clc.h b/libclc/generic/include/clc/clc.h index 109be8228e6a..96e090b30775 100644 --- a/libclc/generic/include/clc/clc.h +++ b/libclc/generic/include/clc/clc.h @@ -11,9 +11,6 @@ /* Function Attributes */ #include -/* 6.9 Preprocessor Directives and Macros */ -#include - /* 6.1 Supported Data Types */ #include @@ -23,6 +20,9 @@ /* 6.2.4.2 Reinterpreting Types Using as_type() and as_typen() */ #include +/* 6.9 Preprocessor Directives and Macros */ +#include + /* 6.11.1 Work-Item Functions */ #include #include diff --git a/libclc/generic/include/clc/float/definitions.h b/libclc/generic/include/clc/float/definitions.h index 6d532a5da021..18f2cbcf3b96 100644 --- a/libclc/generic/include/clc/float/definitions.h +++ b/libclc/generic/include/clc/float/definitions.h @@ -49,7 +49,7 @@ #ifdef cl_khr_fp16 -#if __OPENCL_VERSION__ >= CL_VERSION_1_2 +#if __OPENCL_VERSION__ >= 120 #define HALF_DIG 3 #define HALF_MANT_DIG 11