[Mesa-dev] [PATCH] clover: fix building fix clang-3.8

Francisco Jerez currojerez at riseup.net
Wed Oct 28 06:57:23 PDT 2015


Laurent Carlier <lordheavym at gmail.com> writes:

> https://bugs.freedesktop.org/show_bug.cgi?id=92705
>
> Signed-off-by: Laurent Carlier <lordheavym at gmail.com>
> ---
>  src/gallium/state_trackers/clover/llvm/invocation.cpp | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp
> index d74b50d..e5bee03 100644
> --- a/src/gallium/state_trackers/clover/llvm/invocation.cpp
> +++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp
> @@ -247,7 +247,12 @@ namespace {
>        // attribute.  This attribute will prevent Clang from creating
>        // illegal uses of barrier() (e.g. Moving barrier() inside a conditional
>        // that is no executed by all threads) during its optimizaton passes.
> +#if HAVE_LLVM >= 0x0308
> +      // passing 0 means llvm::Linker::Flags::None
> +      c.getCodeGenOpts().LinkBitcodeFiles.push_back(std::make_pair(0, libclc_path));

Why not just 'c.getCodeGenOpts().LinkBitcodeFiles
.emplace_back(llvm::Linker::Flags::None, libclc_path)'?

> +#else
>        c.getCodeGenOpts().LinkBitcodeFile = libclc_path;
> +#endif
>  
>        optimization_level = c.getCodeGenOpts().OptimizationLevel;
>  
> -- 
> 2.6.2
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20151028/313d8978/attachment.sig>


More information about the mesa-dev mailing list