search for: func_foo

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

Did you mean: find_foo
2012 May 09
0
[LLVMdev] Calling C-language variadic functions
...hat gets > linked to the LLVM module). > > Is there something special I need to do? Declare the function with the right type: FunctionType* FuncTy_7 = FunctionType::get( /*Result=*/IntegerType::get(mod->getContext(), 32), /*Params=*/FuncTy_7_args, /*isVarArg=*/true); Function* func_foo = Function::Create( /*Type=*/FuncTy_7, /*Linkage=*/GlobalValue::ExternalLinkage, /*Name=*/"foo", mod); // (external, no body) func_foo->setCallingConv(CallingConv::C); Note the `` /*isVarArg=*/true " part. These are excerpts taken from the online LLVM demo, which is very...
2012 May 09
2
[LLVMdev] Calling C-language variadic functions
Such as printf, etc., from IR created using the API (IRBuilder). Google hasn't provided much help, and I can't find anything relevant in the docs (the docs talk about how to do varargs in LLVM ASM, but not how to call an external vararg function that exists in a library that gets linked to the LLVM module). Is there something special I need to do? Simply calling
2014 Mar 29
2
[LLVMdev] Cast specific pointer type to generic one
Hi, Suppose I have a pointer to "something" (a structure I defined) and I want to pass the pointer to a generic function, that gets a 64-bit address pointer. How do I do that? For instance: The function is: void Foo (void *); I get the specific pointer using getPointerOperand() on a store instruction that store to it: inst->getPointerOperand()->getType() Now I want