llvmpipe: Fix build after removal of deprecated attribute API v2
authorAaron Watry <awatry@gmail.com>
Tue, 8 Nov 2016 03:55:14 +0000 (21:55 -0600)
committerTom Stellard <thomas.stellard@amd.com>
Wed, 9 Nov 2016 20:13:27 +0000 (20:13 +0000)
Applies on top of v3 of Tom's gallivm change.

v2:
  - Tom Stellard: Use enums instread of strings.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Signed-off-by: Aaron Watry <awatry@gmail.com>
CC: Tom Stellard <thomas.stellard@amd.com>
CC: Jan Vesely <jan.vesely@rutgers.edu>
src/gallium/drivers/llvmpipe/lp_state_fs.c
src/gallium/drivers/llvmpipe/lp_state_setup.c

index 3428eed4e7cda6ea8e2fb97b73ecc32868edb83e..09108159febad54ef5d38b07f73e93e24bc29ee5 100644 (file)
@@ -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);
index a57e2f04b6cd9f43ab293a7575bcda801ee8d1f1..6b0df21b8adaa777366eca43e9879ad45d70ed92 100644 (file)
@@ -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