Hello, I'm trying to write an annotation pass which will pass a C function a number of parameters including one of type [16 x i8*]. However, when I write the C function, this parameter type is compiled to type i8** because of the semantics of arrays in C. I think that to convert this parameter to i8**, I would need to take the address of the array. Is there any way I can do this? If not, is there any way for me to accomplish what I want here? If anyone cares, the type [16 x i8*] is the type of a pool descriptor in PoolAlloc. Thanks, --Patrick
Patrick Simmons <simmon12 at illinois.edu> writes: [snip]> Is there any way I can do this? If not, is there any way for me to > accomplish what I want here?http://www.llvm.org/docs/LangRef.html#i_getelementptr
I read this before posting; however, that article says that the first operand to this instruction must be a pointer type. The type I have is [16 x i8*], not [16 x i8*]*. --Patrick Óscar Fuentes wrote:> The following message is a courtesy copy of an article > that has been posted to gmane.comp.compilers.llvm.devel as well. > > Patrick Simmons <simmon12 at illinois.edu> writes: > > [snip] > >> Is there any way I can do this? If not, is there any way for me to >> accomplish what I want here? >> > > http://www.llvm.org/docs/LangRef.html#i_getelementptr >