Pregunta

I am trying to write an LLVM C API code to generate an LLVM assembly code to count the number of characters in a string. I need to know how to write a getelementptr in LLVM IR equivalent in LLVM C API. I've looked all over google and can't seem to find an answer. Any help or tips would be greatly appreciated. Thank you in advance.

¿Fue útil?

Solución

I think you're looking for the LLVMBuildGEP function from the C API. You can see its prototype in include/llvm-c/Core.h.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top