[LLVMdev] For a small help

Ferad Zyulkyarov feradz at gmail.com
Wed Apr 4 10:48:45 PDT 2007


Hi,

I want to ask for a small help for creating an instruction that calls
e member method of an object. I suppose that this is not a headache
but I am impatient in learning :) I would be very thankful if you can
show me an example snippet code that does this in LLVM. Below is
described my case.

Let's say I have a class TestClass

class TestClass
{
    int testMethod(int a);
}

and I want to create a call instruction that calls
obj.testMethod(input) where obj is an instance of TestClass

TestClass obj; // I have this declared prior
int input = 1; // I have declared prior
int output; // I have this declared prior too
output = obj.testObject(input); // I want to create this instruction

Thanks,
Ferad

-- 
Ferad Zyulkyarov
Barcelona Supercomputing Center



More information about the llvm-dev mailing list