Michel Dänzer <mic...@daenzer.net> writes:

> From: Michel Dänzer <michel.daen...@amd.com>
>
> Signed-off-by: Michel Dänzer <michel.daen...@amd.com>
> ---
>  src/gallium/state_trackers/clover/llvm/invocation.cpp | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp 
> b/src/gallium/state_trackers/clover/llvm/invocation.cpp
> index 5d2efc4..2643cc3 100644
> --- a/src/gallium/state_trackers/clover/llvm/invocation.cpp
> +++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp
> @@ -234,7 +234,11 @@ namespace {
>        memcpy(address_spaces, c.getTarget().getAddressSpaceMap(),
>                                                          
> sizeof(address_spaces));
>  
> +#if HAVE_LLVM >= 0x0306
> +      return act.takeModule().get();

You probably want to call .release() instead and deallocate it manually
later on, otherwise the module will be destroyed here before the end of
the function.

Thanks.

> +#else
>        return act.takeModule();
> +#endif
>     }
>  
>     void
> -- 
> 2.1.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Attachment: pgp6oeX6taFLc.pgp
Description: PGP signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to