search for: llvmappendbasicblock

Displaying 5 results from an estimated 5 matches for "llvmappendbasicblock".

2009 Nov 05
2
[LLVMdev] Strange error for libLLVMCore.a
...ned reference to `LLVMFunctionType' c:\Work\llvm//fac.c:22: undefined reference to `LLVMAddFunction' c:\Work\llvm//fac.c:23: undefined reference to `LLVMSetFunctionCallConv' c:\Work\llvm//fac.c:24: undefined reference to `LLVMGetParam' c:\Work\llvm//fac.c:26: undefined reference to `LLVMAppendBasicBlock' c:\Work\llvm//fac.c:27: undefined reference to `LLVMAppendBasicBlock' c:\Work\llvm//fac.c:28: undefined reference to `LLVMAppendBasicBlock' c:\Work\llvm//fac.c:29: undefined reference to `LLVMAppendBasicBlock' c:\Work\llvm//fac.c:30: undefined reference to `LLVMCreateBuilder' c...
2010 Aug 12
3
[LLVMdev] LLVM-C: Calling functions contained in other libraries
...rname = LLVMAddFunction(module, "NSFullUserName", LLVMFunctionType(LLVMPointerType(LLVMInt8Type(), 0), NULL, 0, 0)); LLVMSetLinkage(fullUsername, LLVMExternalLinkage); result = LLVMAddFunction(module, "MyFunction", LLVMFunctionType(i8Ptr(), NULL, 0, 0)); block = LLVMAppendBasicBlock(result, "entrypoint"); LLVMPositionBuilderAtEnd(builder, block); LLVMValueRef returnVal = LLVMBuildCall(builder, fullUsername, NULL, 0, "myCall"); LLVMBuildRet(builder, returnVal); LLVMDisposeBuilder(builder); return result; } int main (int argc,...
2012 Sep 27
0
[LLVMdev] Possible bug or misunderstanding of feature LLVMConstIntOfString
...cTypes[] = { LLVMInt32Type(), ppInt8 }; LLVMTypeRef rMainFuncType = LLVMFunctionType(LLVMInt32Type(), vpMainFuncTypes, 2, 0); LLVMValueRef vFnMain = LLVMAddFunction(modCEx, "main", rMainFuncType); LLVMSetFunctionCallConv(vFnMain, LLVMCCallConv); LLVMBasicBlockRef bEntry = LLVMAppendBasicBlock(vFnMain, "entry"); LLVMBuilderRef bldr = LLVMCreateBuilder(); LLVMPositionBuilderAtEnd(bldr, bEntry); // "C" printf function; LLVMTypeRef vpFnPrintfArgsType[] = { LLVMPointerType(LLVMInt8Type(), 0) }; LLVMTypeRef vFnPrintfType = LLVMFunctionType(LLVMInt32Ty...
2017 Jan 25
2
mcjit C interface problems
...mod = LLVMModuleCreateWithName("my_module"); LLVMTypeRef param_types[] = {LLVMInt32Type(), LLVMInt32Type()}; LLVMTypeRef ret_type = LLVMFunctionType(LLVMInt32Type(), param_types, 2, 0); LLVMValueRef sum = LLVMAddFunction(mod, "sum", ret_type); LLVMBasicBlockRef entry = LLVMAppendBasicBlock(sum, "entry"); LLVMBuilderRef builder = LLVMCreateBuilder(); LLVMPositionBuilderAtEnd(builder, entry); LLVMValueRef tmp = LLVMBuildAdd(builder, LLVMGetParam(sum, 0), LLVMGetParam(sum, 1), "tmp"); LLVMBuildRet(builder, tmp); char* error = NULL; LLVMVerifyModule(mod,...
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