X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fauxiliary%2Fgallivm%2Flp_bld_struct.c;h=067740b5c885367a181b3b34b2cab6f5045f971d;hb=7730d583c207002e14ca2e95d30cab181db20082;hp=0df44164d80c16464c5292fe85284b7561e4f2c1;hpb=6a049687841d87fc5bbd0fb0a192f03776f67630;p=mesa.git 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));