Lines Matching refs:Function
351 /// function, which is the entrypoint for this file.
377 std::vector<Function*> LazilyLinkFunctions;
427 bool linkFunctionProto(Function *SrcF);
433 void linkFunctionBody(Function *Dst, Function *Src);
774 /// linkFunctionProto - Link the function in the source module into the
776 bool ModuleLinker::linkFunctionProto(Function *SF) {
796 // Track the function from the source module so we don't attempt to remap
806 Function *NewDF = Function::Create(TypeMap.get(SF->getFunctionType()),
914 /// linkFunctionBody - Copy the source function over into the dest function and
916 /// function, and that Src is not.
917 void ModuleLinker::linkFunctionBody(Function *Dst, Function *Src) {
920 // Go through and convert function arguments over, remembering the mapping.
921 Function::arg_iterator DI = Dst->arg_begin();
922 for (Function::arg_iterator I = Src->arg_begin(), E = Src->arg_end();
931 // Splice the body of the source function into the dest function.
934 // At this point, all of the instructions and values of the function are now
936 // the Source function as operands. Loop through all of the operands of the
938 for (Function::iterator BB = Dst->begin(), BE = Dst->end(); BB != BE; ++BB)
943 // Clone the body of the function into the dest function.
949 for (Function::arg_iterator I = Src->arg_begin(), E = Src->arg_end();
1182 // Link the functions together between the two modules, without doing function
1183 // bodies... this just adds external function prototypes to the DstM
1184 // function... We do this so that when we begin processing function bodies,
1204 // Link in the function bodies that are defined in the source module into
1210 // Skip if no body (function is external) or materialize.
1218 linkFunctionBody(cast<Function>(ValueMap[SF]), SF);
1239 for(std::vector<Function*>::iterator I = LazilyLinkFunctions.begin(),
1244 Function *SF = *I;
1245 Function *DF = cast<Function>(ValueMap[SF]);
1257 // Link in function body.
1265 // since we linked in a function.
1272 for(std::vector<Function*>::iterator I = LazilyLinkFunctions.begin(),
1277 Function *SF = *I;
1278 Function *DF = cast<Function>(ValueMap[SF]);
1294 /// LinkModules - This function links two modules together, with the resulting