Lines Matching refs:function

15 …MagicMemFunction(Module &M, Function *function, Function *wrapper, bool isDealloc, bool isNested, …
32 void addInstructionDep(MagicMemFunction &function);
39 …static int getMemFunctionPointerParam(Function* function, std::set<Function*> &brkFunctions, TypeI…
40 …static Function* getCustomWrapper(Function* function, Function* stdFunction, Function* stdWrapper,…
42 static bool isCustomWrapper(Function *function);
46 Function *function; variable
78 OS << function->getName() << "(" << TypeUtil::getDescription(function->getFunctionType()) << ")"; in printDescription()
135 inline MagicMemFunction::MagicMemFunction(Module &M, Function *function, Function *wrapper, bool is… in MagicMemFunction() argument
137 this->function = function; in MagicMemFunction()
149 assert(function); in MagicMemFunction()
159 return function; in getFunction()
222 inline void MagicMemFunction::addInstructionDep(MagicMemFunction &function) { in addInstructionDep() argument
224 instructionDeps.push_back(function); in addInstructionDep()
225 allocFlags |= function.getAllocFlags(); in addInstructionDep()
284 inline int MagicMemFunction::getMemFunctionPointerParam(Function* function, std::set<Function*> &br… in getMemFunctionPointerParam() argument
285 TYPECONST Type *type = function->getReturnType(); in getMemFunctionPointerParam()
288 } else if (brkFunctions.find(function) != brkFunctions.end()) { in getMemFunctionPointerParam()
292 for (i = 1; i < function->getFunctionType()->getNumContainedTypes(); i++) { in getMemFunctionPointerParam()
293 type = function->getFunctionType()->getContainedType(i); in getMemFunctionPointerParam()
313 allocWrapperCacheIt = allocWrapperCache.find(function->getName()); in buildWrapper()
325 E = function->arg_end(); in buildWrapper()
326 for (Function::const_arg_iterator I = function->arg_begin(); I != E; ++I) in buildWrapper()
330 …FunctionType *FTy = FunctionType::get(function->getFunctionType()->getReturnType(), ArgTypes, func… in buildWrapper()
333 …wrapper = Function::Create(FTy, function->getLinkage(), "magic_" + function->getName(), function->… in buildWrapper()
346 …for (Function::const_arg_iterator I = function->arg_begin(), E = function->arg_end(); I != E; ++I)… in buildWrapper()
352 CloneFunctionInto(wrapper, function, VMap, false, Returns, "", NULL); in buildWrapper()
354 allocWrapperCache.insert(std::pair<std::string, Function*>(function->getName(), wrapper)); in buildWrapper()
362 …for (inst_iterator I = inst_begin(function), E = inst_end(function); I != E; ++I, instructionOffse… in buildWrapper()
386 inline Function* MagicMemFunction::getCustomWrapper(Function* function, Function* stdFunction, Func… in getCustomWrapper() argument
403 …for (Function::const_arg_iterator I = function->arg_begin(), E = function->arg_end(); I != E; ++I)… in getCustomWrapper()
408 …tionType::get(stdWrapper->getFunctionType()->getReturnType(), ArgTypes, function->getFunctionType(… in getCustomWrapper()
411 …wrapper = Function::Create(FTy, function->getLinkage(), "magic_" + function->getName(), function->… in getCustomWrapper()
424 …for (Function::const_arg_iterator I = function->arg_begin(), E = function->arg_end(); I != E; ++I)… in getCustomWrapper()
484 if (CI && (CI->getCalledFunction() == function)) { in getCustomWrapper()
510 unsigned numParams = function->getFunctionType()->getNumParams(); in getCustomWrapper()
517 TYPECONST Type* paramType = function->getFunctionType()->getParamType(i); in getCustomWrapper()
537 CallInst* newCallInst = MagicUtil::createCallInstruction(function, callArgs, "", callInst); in getCustomWrapper()
549 inline bool MagicMemFunction::isCustomWrapper(Function *function) in isCustomWrapper() argument
551 return customWrapperSet.find(function) != customWrapperSet.end(); in isCustomWrapper()