[Mesa-dev] [PATCH 2/2] swr: fix llvm-5.0.0 build bustage
Cherniak, Bruce
bruce.cherniak at intel.com
Tue Mar 28 13:01:07 UTC 2017
Reviewed-by: Bruce Cherniak <bruce.cherniak at intel.com>
> On Mar 27, 2017, at 1:34 PM, Tim Rowley <timothy.o.rowley at intel.com> wrote:
>
> Handle rename of llvm AttributeSet to AttributeList in the same
> fashion as ac_llvm_helper.cpp.
> ---
> src/gallium/drivers/swr/swr_shader.cpp | 24 +++++++++++++++---------
> 1 file changed, 15 insertions(+), 9 deletions(-)
>
> diff --git a/src/gallium/drivers/swr/swr_shader.cpp b/src/gallium/drivers/swr/swr_shader.cpp
> index f75909e..9d42ecd 100644
> --- a/src/gallium/drivers/swr/swr_shader.cpp
> +++ b/src/gallium/drivers/swr/swr_shader.cpp
> @@ -47,6 +47,12 @@
> #include "swr_state.h"
> #include "swr_screen.h"
>
> +#if HAVE_LLVM < 0x0500
> +namespace llvm {
> +typedef AttributeSet AttributeList;
> +}
> +#endif
> +
> using namespace SwrJit;
> using namespace llvm;
>
> @@ -522,8 +528,8 @@ BuilderSWR::CompileGS(struct swr_context *ctx, swr_jit_gs_key &key)
>
> AttrBuilder attrBuilder;
> attrBuilder.addStackAlignmentAttr(JM()->mVWidth * sizeof(float));
> - AttributeSet attrSet = AttributeSet::get(
> - JM()->mContext, AttributeSet::FunctionIndex, attrBuilder);
> + AttributeList attrSet = AttributeList::get(
> + JM()->mContext, AttributeList::FunctionIndex, attrBuilder);
>
> std::vector<Type *> gsArgs{PointerType::get(Gen_swr_draw_context(JM()), 0),
> PointerType::get(Gen_SWR_GS_CONTEXT(JM()), 0)};
> @@ -535,7 +541,7 @@ BuilderSWR::CompileGS(struct swr_context *ctx, swr_jit_gs_key &key)
> GlobalValue::ExternalLinkage,
> "GS",
> JM()->mpCurrentModule);
> - pFunction->addAttributes(AttributeSet::FunctionIndex, attrSet);
> + pFunction->addAttributes(AttributeList::FunctionIndex, attrSet);
>
> BasicBlock *block = BasicBlock::Create(JM()->mContext, "entry", pFunction);
> IRB()->SetInsertPoint(block);
> @@ -661,8 +667,8 @@ BuilderSWR::CompileVS(struct swr_context *ctx, swr_jit_vs_key &key)
>
> AttrBuilder attrBuilder;
> attrBuilder.addStackAlignmentAttr(JM()->mVWidth * sizeof(float));
> - AttributeSet attrSet = AttributeSet::get(
> - JM()->mContext, AttributeSet::FunctionIndex, attrBuilder);
> + AttributeList attrSet = AttributeList::get(
> + JM()->mContext, AttributeList::FunctionIndex, attrBuilder);
>
> std::vector<Type *> vsArgs{PointerType::get(Gen_swr_draw_context(JM()), 0),
> PointerType::get(Gen_SWR_VS_CONTEXT(JM()), 0)};
> @@ -674,7 +680,7 @@ BuilderSWR::CompileVS(struct swr_context *ctx, swr_jit_vs_key &key)
> GlobalValue::ExternalLinkage,
> "VS",
> JM()->mpCurrentModule);
> - pFunction->addAttributes(AttributeSet::FunctionIndex, attrSet);
> + pFunction->addAttributes(AttributeList::FunctionIndex, attrSet);
>
> BasicBlock *block = BasicBlock::Create(JM()->mContext, "entry", pFunction);
> IRB()->SetInsertPoint(block);
> @@ -872,8 +878,8 @@ BuilderSWR::CompileFS(struct swr_context *ctx, swr_jit_fs_key &key)
>
> AttrBuilder attrBuilder;
> attrBuilder.addStackAlignmentAttr(JM()->mVWidth * sizeof(float));
> - AttributeSet attrSet = AttributeSet::get(
> - JM()->mContext, AttributeSet::FunctionIndex, attrBuilder);
> + AttributeList attrSet = AttributeList::get(
> + JM()->mContext, AttributeList::FunctionIndex, attrBuilder);
>
> std::vector<Type *> fsArgs{PointerType::get(Gen_swr_draw_context(JM()), 0),
> PointerType::get(Gen_SWR_PS_CONTEXT(JM()), 0)};
> @@ -884,7 +890,7 @@ BuilderSWR::CompileFS(struct swr_context *ctx, swr_jit_fs_key &key)
> GlobalValue::ExternalLinkage,
> "FS",
> JM()->mpCurrentModule);
> - pFunction->addAttributes(AttributeSet::FunctionIndex, attrSet);
> + pFunction->addAttributes(AttributeList::FunctionIndex, attrSet);
>
> BasicBlock *block = BasicBlock::Create(JM()->mContext, "entry", pFunction);
> IRB()->SetInsertPoint(block);
> --
> 2.9.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list