Timothee Cour
2015-Mar-03 04:42 UTC
[LLVMdev] 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 this->deleteNode(remove(where)); 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). -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150302/bb2a2de5/attachment.html>