std::function is a better choice than a raw function pointer here. You probably still want to be careful about cleaning up stuff you captured, but it's not like a function pointer wasn't going to let you shoot yourself in the foot given enough dedication.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217718 91177308-0d34-0410-b5e6-96231b3b80d8