[Mesa-dev] [PATCH] clover/llvm: Fix build against LLVM/Clang 4.0

Francisco Jerez currojerez at riseup.net
Thu Mar 22 01:41:15 UTC 2018


Aaron Watry <awatry at gmail.com> writes:

> The opencl 1.0 langstandard was renamed in 5.0+
>
> v2: Move preprocessor check into compat.hpp
>
> Cc: Mark Janes <mark.a.janes at intel.com>
> Cc: Francisco Jerez <currojerez at riseup.net>

Reviewed-by: Francisco Jerez <currojerez at riseup.net>

> ---
>  src/gallium/state_trackers/clover/llvm/compat.hpp     | 2 ++
>  src/gallium/state_trackers/clover/llvm/invocation.cpp | 2 +-
>  2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/state_trackers/clover/llvm/compat.hpp b/src/gallium/state_trackers/clover/llvm/compat.hpp
> index 19528a0133..2e070b2eef 100644
> --- a/src/gallium/state_trackers/clover/llvm/compat.hpp
> +++ b/src/gallium/state_trackers/clover/llvm/compat.hpp
> @@ -89,8 +89,10 @@ namespace clover {
>  
>  #if HAVE_LLVM >= 0x0500
>           const clang::InputKind ik_opencl = clang::InputKind::OpenCL;
> +         const clang::LangStandard::Kind lang_opencl10 = clang::LangStandard::lang_opencl10;
>  #else
>           const clang::InputKind ik_opencl = clang::IK_OpenCL;
> +         const clang::LangStandard::Kind lang_opencl10 = clang::LangStandard::lang_opencl;
>  #endif
>  
>           inline void
> diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp
> index af78c2ae28..b2c64bc48f 100644
> --- a/src/gallium/state_trackers/clover/llvm/invocation.cpp
> +++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp
> @@ -85,7 +85,7 @@ namespace {
>      };
>  
>      const clc_version_lang_std cl_version_lang_stds[] = {
> -       { 100, clang::LangStandard::lang_opencl10},
> +       { 100, compat::lang_opencl10},
>         { 110, clang::LangStandard::lang_opencl11},
>         { 120, clang::LangStandard::lang_opencl12},
>         { 200, clang::LangStandard::lang_opencl20},
> -- 
> 2.14.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180321/aa9412d2/attachment.sig>


More information about the mesa-dev mailing list