how to detach a LLVMValueRef (remove from parent without deleting it) ?

I’d like to remove a node (eg a LLVMValueRef representing a function) from a parent (eg module) without deleting it. How can I do that, especially from C API.
eg, looking at the implementation of LLVMDeleteFunction, it calls
somewhere deep inside; I’d like the remove without the deleteNode.

Use case: when a function is currently under construction (but for eg basic blocks are not yet terminated), and I need to call into LLVMRunFunction but don’t care about the function currently under construction. After that I expect to be able to re-attach the detached function to its parent (for eg).