bool deleteFuncByName()

in lib/BPFCov.cpp [83:95]


    bool deleteFuncByName(Module &M, StringRef Name)
    {
        auto F = M.getFunction(Name);
        if (!F)
        {
            return false;
        }
        errs() << "erasing " << Name << "()\n";
        F->replaceAllUsesWith(UndefValue::get(F->getType()));
        F->eraseFromParent();

        return true;
    }