Displaying 1 result from an estimated 1 matches for "_z9get_hellov".
2008 Nov 15
1
[LLVMdev] How to use EE->runFunction for a function with StructRet set?
...ot;StructRetExample.bc",
&ErrorMessage));
Module *M = ParseBitcodeFile(Buffer.get(), &ErrorMessage);
ExecutionEngine *EE = ExecutionEngine::create(new
ExistingModuleProvider(M), false, &ErrorMessage);
// Function returning std::string
Function *F = M->getFunction("_Z9get_hellov");
// XXX Is all of this the right way?
const Type* paramType = F->getFunctionType()->getParamType(0); //
pointer to struct
const Type* structRetType = dynamic_cast<const
PointerType*>(paramType)->getTypeAtIndex((unsigned)0);
const std::string structRetName(M->getT...