fix llvm_build_struct_gep for PR6167, patch by

Peter Hawkins!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95644 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2010-02-09 01:39:46 +00:00
parent e576f292ee
commit c3c3be582d

View File

@ -1263,11 +1263,10 @@ CAMLprim LLVMValueRef llvm_build_in_bounds_gep(LLVMValueRef Pointer,
/* llvalue -> int -> string -> llbuilder -> llvalue */
CAMLprim LLVMValueRef llvm_build_struct_gep(LLVMValueRef Pointer,
value Indices, value Name,
value Index, value Name,
value B) {
return LLVMBuildInBoundsGEP(Builder_val(B), Pointer,
(LLVMValueRef *) Op_val(Indices),
Wosize_val(Indices), String_val(Name));
return LLVMBuildStructGEP(Builder_val(B), Pointer,
Int_val(Index), String_val(Name));
}
/* string -> string -> llbuilder -> llvalue */