Lines Matching full:wrapper
14 /// bitcasts of functions and rewrite them to use wrapper functions instead.
86 // Create a wrapper function with type Ty that calls F (which may have a
94 // I32 vs pointer type) then we don't create a wrapper at all (return nullptr
98 // module then generate wrapper that contains unreachable (i.e. abort at
108 // generate a wrapper.
112 Function *Wrapper = Function::Create(Ty, Function::PrivateLinkage,
114 BasicBlock *BB = BasicBlock::Create(M->getContext(), "body", Wrapper);
119 Function::arg_iterator AI = Wrapper->arg_begin();
120 Function::arg_iterator AE = Wrapper->arg_end();
200 // Create a new wrapper that simply contains `unreachable`.
201 Wrapper->eraseFromParent();
202 Wrapper = Function::Create(Ty, Function::PrivateLinkage,
204 BasicBlock *BB = BasicBlock::Create(M->getContext(), "body", Wrapper);
206 Wrapper->setName(F->getName() + "_bitcast_invalid");
208 LLVM_DEBUG(dbgs() << "createWrapper: no wrapper needed: " << F->getName()
210 Wrapper->eraseFromParent();
214 return Wrapper;
245 // bitcasted to that type so that we generate a wrapper for it, so that
275 Function *Wrapper = Pair.first->second;
276 if (!Wrapper)
279 CB->setCalledOperand(Wrapper);
282 // If we created a wrapper for main, rename the wrapper so that it's the
290 // The wrapper is not needed in this case as we don't need to export
294 // Otherwise give the wrapper the same linkage as the original main