Displaying 1 result from an estimated 1 matches for "structretnam".
Did you mean:
structretname
2008 Nov 15
1
[LLVMdev] How to use EE->runFunction for a function with StructRet set?
...tion("_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()->getABITypeSize(structRetType);
// Make room on stack
void* p = alloca(size);
// Create parameter list
std::vector<...