[LLVMdev] Function Arguments

Óscar Fuentes ofv at wanadoo.es
Wed Aug 18 18:02:39 PDT 2010


Matt Masten <mmasten at lanl.gov> writes:

[snip]

> Instead of passing in 
> the entire array by value, I would like to somehow associate "str" with 
> a char* and then use that as the parameter to the function.  I wasn't 
> able to find an example of this in the documentation and was wondering 
> if you could point me in the right direction.  I'm guessing there's a 
> simple solution to this that I have somehow overlooked.

Use a pointer to a 8 bit integer type (aka `char') instead of the
array. You pass a pointer to the first char of the string. Just like C.




More information about the llvm-dev mailing list