[llvm] [llvm-c] Provide LLVMGetGEPResultElementType (PR #95693)

Vaivaswatha N via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 16 03:26:41 PDT 2024


vaivaswatha wrote:

> Why do you need this? Use of getResultElementType() is something of a red flag, and I do not want to expose it to the C API unless there is a strong need.

Is there any other way to get a GEP's result element type using the C API? Since the instruction's type itself is just an opaque pointer type, I couldn't find any other way to get this.

I'm trying to build my own internal representation of LLVM-IR, so I'd need this for a complete translation. 

https://github.com/llvm/llvm-project/pull/95693


More information about the llvm-commits mailing list