Displaying 1 result from an estimated 1 matches for "structrettype".
2008 Nov 15
1
[LLVMdev] How to use EE->runFunction for a function with StructRet set?
...xistingModuleProvider(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->getTypeName(structRetType));
if (structRetName != "struct.std::string")
return 1;
// Get object size
uint64_t size = EE->getTargetData()->getABITy...