From: Aaron Watry Date: Tue, 8 Nov 2016 03:55:14 +0000 (-0600) Subject: llvmpipe: Fix build after removal of deprecated attribute API v2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=14926330703bb5ea6a84c845e192021f057f9401;p=mesa.git llvmpipe: Fix build after removal of deprecated attribute API v2 Applies on top of v3 of Tom's gallivm change. v2: - Tom Stellard: Use enums instread of strings. Reviewed-by: Nicolai Hähnle Signed-off-by: Aaron Watry CC: Tom Stellard CC: Jan Vesely --- diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index 3428eed4e7c..09108159feb 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -2296,7 +2296,7 @@ generate_fragment(struct llvmpipe_context *lp, */ for(i = 0; i < ARRAY_SIZE(arg_types); ++i) if(LLVMGetTypeKind(arg_types[i]) == LLVMPointerTypeKind) - LLVMAddAttribute(LLVMGetParam(function, i), LLVMNoAliasAttribute); + lp_add_function_attr(function, i + 1, LP_FUNC_ATTR_NOALIAS); context_ptr = LLVMGetParam(function, 0); x = LLVMGetParam(function, 1); diff --git a/src/gallium/drivers/llvmpipe/lp_state_setup.c b/src/gallium/drivers/llvmpipe/lp_state_setup.c index a57e2f04b6c..6b0df21b8ad 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_setup.c +++ b/src/gallium/drivers/llvmpipe/lp_state_setup.c @@ -624,8 +624,7 @@ set_noalias(LLVMBuilderRef builder, int i; for(i = 0; i < nr_args; ++i) if(LLVMGetTypeKind(arg_types[i]) == LLVMPointerTypeKind) - LLVMAddAttribute(LLVMGetParam(function, i), - LLVMNoAliasAttribute); + lp_add_function_attr(function, i + 1, LP_FUNC_ATTR_NOALIAS); } static void