Frage

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.

War es hilfreich?

Lösung

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top