search for: llvmgetelementtype

Displaying 2 results from an estimated 2 matches for "llvmgetelementtype".

2008 May 22
3
[LLVMdev] How to get a return type of a function with LLVM-C API
Hi LLVM-ers, I am trying to get a return type of a function(from bitcode file) with LLVM-C API, but there seems no appropriate API to do that. I've tried to do that with following code, ---- LLVMModuleRef M; LLVMMemoryBufferRef MemBuf; LLVMValueRef F; // Function LLVMTypeRef RetTy; char *ErrStr; // // -- Load shader module //
2008 May 22
0
[LLVMdev] How to get a return type of a function with LLVM-C API
Hi Syoyo, > I am trying to get a return type of a function(from bitcode file) with > LLVM-C API, but there seems no appropriate API to do that. From my memory, this info is stored in the function type, so you could look at the function's type and get the info there. Looking the the API docs [1], I find that there is a simple method on Function called getReturnType(). You should thus be