[Beignet] [PATCH] GBE: fix build error with LLVM 3.5 and previous version.

Yang, Rong R rong.r.yang at intel.com
Tue Sep 8 19:45:06 PDT 2015


LGTM, pushed, thanks.

> -----Original Message-----
> From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of
> Zhigang Gong
> Sent: Wednesday, September 9, 2015 09:08
> To: beignet at lists.freedesktop.org
> Cc: Gong, Zhigang
> Subject: [Beignet] [PATCH] GBE: fix build error with LLVM 3.5 and previous
> version.
> 
> Signed-off-by: Zhigang Gong <zhigang.gong at intel.com>
> ---
>  backend/src/backend/program.cpp | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/backend/src/backend/program.cpp
> b/backend/src/backend/program.cpp index 330bead..57a5037 100644
> --- a/backend/src/backend/program.cpp
> +++ b/backend/src/backend/program.cpp
> @@ -575,7 +575,12 @@ namespace gbe {
>                                                Diags);
>      llvm::StringRef srcString(source);
>      (*CI).getPreprocessorOpts().addRemappedFile("stringInput.cl",
> -                llvm::MemoryBuffer::getMemBuffer(srcString).release());
> +#if LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR <= 5
> +                llvm::MemoryBuffer::getMemBuffer(srcString)
> +#else
> +                llvm::MemoryBuffer::getMemBuffer(srcString).release()
> +#endif
> +                );
> 
>      // Create the compiler instance
>      clang::CompilerInstance Clang;
> --
> 1.9.1
> 
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list