Displaying 1 result from an estimated 1 matches for "print2f".
Did you mean:
print2
2013 Nov 21
1
[LLVMdev] Replacing C-style function
...t1fPtr = ee->getPointerToFunction( print1f );
int ret = ((int(*)(void))(print1fPtr))();
EXPECT_EQ(0xdeadbeef, ret);
However, when i try to replace the use of print1 with print2, it doesn't
seem to work correctly. This is the sequence of steps that I am following:
llvm::Function *print2f = main->getFunction( "print2" );
print2f->takeName( print1f );
llvm::Function *mainf = main->getFunction( "mainOfLibrary" );
ee->freeMachineCodeForFunction( mainf );
ee->freeMachineCodeForFunction( print1f );
print1f->replaceAllUsesWith( print2...