Lines Matching refs:OrigFn
110 llvm::Function *RedefineFn(llvm::Function *OrigFn, in RedefineFn() argument
113 llvm::FunctionType *FTy = OrigFn->getFunctionType(); in RedefineFn()
120 OrigFn->getLinkage(), in RedefineFn()
121 OrigFn->getName(), in RedefineFn()
122 OrigFn->getParent()); in RedefineFn()
131 NewFn->copyAttributesFrom(OrigFn); in RedefineFn()
132 NewFn->takeName(OrigFn); in RedefineFn()
134 for (auto AI=OrigFn->arg_begin(), AE=OrigFn->arg_end(), in RedefineFn()
184 for (auto &OrigFn: FunctionList) { in runOnModule() local
185 if (!IsRSFunctionOfInterest(OrigFn)) in runOnModule()
187 FunctionsToHandle.push_back(&OrigFn); in runOnModule()
190 for (auto OrigFn: FunctionsToHandle) { in runOnModule() local
192 if (!FillArgsToDeref(OrigFn, ArgsToDeref)) in runOnModule()
196 llvm::Function *NewFn = RedefineFn(OrigFn, ArgsToDeref); in runOnModule()
197 while (!OrigFn->use_empty()) { in runOnModule()
198 llvm::CallSite CS(OrigFn->user_back()); in runOnModule()
201 OrigFn->eraseFromParent(); in runOnModule()