[Mesa-dev] Mesa (master): clover: Fix build with LLVM 3.5

Michel Dänzer michel at daenzer.net
Tue Feb 25 18:53:08 PST 2014


On Die, 2014-02-25 at 13:33 -0800, Tom Stellard wrote:
> 
> diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp
> index e826669..cdf32b6 100644
> --- a/src/gallium/state_trackers/clover/llvm/invocation.cpp
> +++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp
> @@ -297,8 +297,10 @@ namespace {
>              llvm::Argument &arg = *I;
>  #if HAVE_LLVM < 0x0302
>              llvm::TargetData TD(kernel_func->getParent());
> -#else
> +#elif HAVE_LLVM < 0x0304
>              llvm::DataLayout TD(kernel_func->getParent()->getDataLayout());
> +#else
> +            llvm::DataLayout TD(mod);
>  #endif

Is it intended and correct to use the latest variant for LLVM 3.4 as
well?


-- 
Earthling Michel Dänzer            |                  http://www.amd.com
Libre software enthusiast          |                Mesa and X developer



More information about the mesa-dev mailing list