Вопрос

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.

Это было полезно?

Решение

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

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top