Use std::function instead of llvm::function_ref.