search for: call_interface_init

Displaying 2 results from an estimated 2 matches for "call_interface_init".

2018 Feb 20
2
Calling virtual elf functions under windows -> Adding ASM code
Still no progress with this problem. Only that non-member functions seems to be working... Also: Even when I set the target triple of the Module (when the file was parsed at runtime) to "COFF" nothing changes... From: Bjoern Gaier/HE/HORIBA To: llvm-dev at lists.llvm.org Cc: cfe-dev at lists.llvm.org Date: 08.02.2018 12:28 Subject: Re: Calling virtual elf functions
2018 Feb 22
0
[cfe-dev] Calling virtual elf functions under windows -> Adding ASM code
...ing a regular function pointer (returned from > getFunctionAddress) to a virtual method pointer. This is undefined behavior. > > The easiest way to achieve the effect you want would be to add a > trampoline to your source (or at the IR level): > > extern "C" SimpleResult call_Interface_init(Interface *Instance) { return > Instance->init(); } > > Then you can just use: > > auto CallInit = (SimpleResult(*)(Interface*))engine->getFunctionAddress(" > call_Interface_init"); > CallInit(inter); > > Cheers, > Lang. > > > On Tue, Feb 20, 2...