summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/gallivm/lp_bld_struct.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_struct.c')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_struct.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_struct.c b/src/gallium/auxiliary/gallivm/lp_bld_struct.c
index 0df44164d80..067740b5c88 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_struct.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_struct.c
@@ -54,7 +54,7 @@ lp_build_struct_get_ptr(struct gallivm_state *gallivm,
assert(LLVMGetTypeKind(LLVMGetElementType(LLVMTypeOf(ptr))) == LLVMStructTypeKind);
indices[0] = lp_build_const_int32(gallivm, 0);
indices[1] = lp_build_const_int32(gallivm, member);
- member_ptr = LLVMBuildGEP(gallivm->builder, ptr, indices, Elements(indices), "");
+ member_ptr = LLVMBuildGEP(gallivm->builder, ptr, indices, ARRAY_SIZE(indices), "");
lp_build_name(member_ptr, "%s.%s_ptr", LLVMGetValueName(ptr), name);
return member_ptr;
}
@@ -88,7 +88,7 @@ lp_build_array_get_ptr(struct gallivm_state *gallivm,
assert(LLVMGetTypeKind(LLVMGetElementType(LLVMTypeOf(ptr))) == LLVMArrayTypeKind);
indices[0] = lp_build_const_int32(gallivm, 0);
indices[1] = index;
- element_ptr = LLVMBuildGEP(gallivm->builder, ptr, indices, Elements(indices), "");
+ element_ptr = LLVMBuildGEP(gallivm->builder, ptr, indices, ARRAY_SIZE(indices), "");
#ifdef DEBUG
lp_build_name(element_ptr, "&%s[%s]",
LLVMGetValueName(ptr), LLVMGetValueName(index));