Displaying 5 results from an estimated 5 matches for "foofunction".
2011 Nov 11
2
[LLVMdev] Argument's types mismatch when creating CallInst.
Hello. I have an .bc, which defines @foo(%type* arg1, %type* arg2, %type*
arg3).
Firstly, i do this:
runtimeModule = getLazyIRFileModule("runtime.bc", smd, llctx);
then this:
fooFunction = runtimeModule->getFunction("foo");
myType = runtimeModule->getTypeByName("type");
After that, i'm creating another module:
myModule = new Module("My Module", llctx);
and create some AllocaInsts with type %type:
AllocaInst * retZval = new AllocaInst(myTy...
2015 Mar 24
2
[LLVMdev] IR blocks for calling function pointers
...pointer.
For creating the IR for a function call to "foo", with "foo" being defined
as "void foo(int)", I can use the "getOrInsertFunction" call from Module
class as follows:
std::vector<Type*> FooArgs;
FooArgs.push_back(IRB.getInt64Ty());
Value *FooFunction = M.getOrInsertFunction(std::string("foo"),
FunctionType::get(IRB.getVoidTy(),
ArrayRef<Type*>(FooArgs), false));
IRB.CreateCall(FooFunction, IRB.CreateLoad(LenAlloca));
I want to create a similar call, but to the pointer of foo ("foo...
2011 Nov 11
0
[LLVMdev] Argument's types mismatch when creating CallInst.
...1, 2011 at 12:18 AM, arrowdodger <6yearold at gmail.com> wrote:
> Hello. I have an .bc, which defines @foo(%type* arg1, %type* arg2, %type*
> arg3).
> Firstly, i do this:
>
> runtimeModule = getLazyIRFileModule("runtime.bc", smd, llctx);
>
> then this:
>
> fooFunction = runtimeModule->getFunction("foo");
> myType = runtimeModule->getTypeByName("type");
>
> After that, i'm creating another module:
>
> myModule = new Module("My Module", llctx);
>
> and create some AllocaInsts with type %type:
>
> A...
2011 Nov 12
1
[LLVMdev] Argument's types mismatch when creating CallInst.
...an at gmail.com>wrote:
> A CallInst in one module can't reference a Function in another module.
> Build a declaration of foo in the module where you're building the
> call, and call that.
>
> -Eli
>
Hmm, before emitting any code i've added this:
Function::Create(fooFunction->getFunctionType(),fooFunction->getLinkage(),"foo",myModule);
Now i see @foo declaration when dumping myModule, but the error is still
same.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/2011...
2013 Mar 29
0
[LLVMdev] Handling SRet on Windows x86...
...virtual void Def() = 0;
};
Foo* foo;
foo->Abc(); what is the ABI in terms of C?
Note well the "virtual" and "=0". They are important.
COM declares that is this (except for old CFM Macintosh PowerPC?):
struct Foo;
typedef struct Foo Foo; struct FooFunctions
{
void (*Abc)(Foo*);
void (*Def)(Foo*);
}; struct Foo
{
FooFunctions const * Functions;
};
Foo* foo;
foo->Functions->Abc(foo);
There are other possibilities, but is what COM says.
WinRT is seemingly merely a way to encode .h files in a binary for...