search for: llvmgetreturntype

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

2008 May 22
3
[LLVMdev] How to get a return type of a function with LLVM-C API
...Load shader module // ret = LLVMCreateMemoryBufferWithContentsOfFile( input, &MemBuf, // [out] &ErrStr); // [out] ret = LLVMParseBitcode( MemBuf, &M, // [out] &ErrStr); // [out] F = LLVMGetFirstFunction(M); RetTy = LLVMGetReturnType(F); // NG! Can't do this ---- How can I do that? (I am using HEAD version of llvm) And is there a tutorial or document for LLVM C API? Thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachmen...
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