search for: llvmgetfirstfunction

Displaying 3 results from an estimated 3 matches for "llvmgetfirstfunction".

2017 Apr 28
2
LLVMGetFirstFunction() / LLVMGetNextFunction( ) problem
...izable ; Function Attrs: noinline nounwind uwtable define i32 @main() #0 {} ... However, when I use LLVMGetirstFunction() and LLVMGetNextFunction() to iterate through the functions in the module, it only iterates through the function "matmul". It never finds main(). 50 first_func = LLVMGetFirstFunction(module); (gdb) next 151 last_func = LLVMGetLastFunction(module); (gdb) 154 for (func = first_func; func != last_func; func = LLVMGetNextFunction(func)) { (gdb) 155 func_name = LLVMGetValueName(func); (gdb) 156 func_addr = LLVMGetFunctionAddress(engine, func_name); (gdb) prin...
2008 May 22
3
[LLVMdev] How to get a return type of a function with LLVM-C API
...*ErrStr; // // -- 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.o...
2013 Sep 30
1
[LLVMdev] RFC: llvm-shlib-test (Was: [llvm] r191029 - llvm-c: Make LLVMGetFirstTarget a proper prototype)
Attached is what I got thus far. What I'm struggling with is proper integration in build system. What is in there is just wild guesses from my side, both on autoconf and cmake variants. It would be great if someone with proper knowledge of the buildsystems could have a look. Also I'm not sure how to properly handle compilation on msvc - clearly "-std=c11 -Wstrict-prototypes" is