diff options
author | José Fonseca <jfonseca@vmware.com> | 2009-08-25 06:40:22 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2009-08-29 09:21:42 +0100 |
commit | d4806c64a23b8dfc58313b54e607f6c3cd8ae5ff (patch) | |
tree | 296f6d077c1a0c334c94b5d94a0f72f55f14ac09 /src/gallium/drivers/llvmpipe/lp_bld_struct.c | |
parent | 8aa62cead71b4d06e49fccf02405c1ce649186fd (diff) |
llvmpipe: Better structure dereference naming.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_bld_struct.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_bld_struct.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_struct.c b/src/gallium/drivers/llvmpipe/lp_bld_struct.c index 4877c4d3f7..14d2b10df9 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_struct.c +++ b/src/gallium/drivers/llvmpipe/lp_bld_struct.c @@ -37,6 +37,7 @@ #include "util/u_debug.h" #include "util/u_memory.h" +#include "lp_bld_debug.h" #include "lp_bld_struct.h" @@ -47,8 +48,12 @@ lp_build_struct_get(LLVMBuilderRef builder, const char *name) { LLVMValueRef indices[2]; + LLVMValueRef member_ptr; + LLVMValueRef res; indices[0] = LLVMConstInt(LLVMInt32Type(), 0, 0); indices[1] = LLVMConstInt(LLVMInt32Type(), member, 0); - ptr = LLVMBuildGEP(builder, ptr, indices, Elements(indices), ""); - return LLVMBuildLoad(builder, ptr, name); + member_ptr = LLVMBuildGEP(builder, ptr, indices, Elements(indices), ""); + res = LLVMBuildLoad(builder, member_ptr, ""); + lp_build_name(res, "%s.%s", LLVMGetValueName(ptr), name); + return res; } |