CloneFunction.cpp currently says "It is only legal to clone a function if a block address within that function is never referenced outside of the function.".
This is only the case for cloning into the same module (this patch handles this); for cloning/moving into a different module, it is actually okay.
I'm still working on a unit test but want to hear the reviewer's opinion earlier since I'm not sure why it is not handled before, no valid use case, or some constraints.
This assertion looks not stable. It is easy to generate code to break the assumption.