[LLVMdev] Cloning Functions

David Greene dag at cray.com
Wed Jul 9 09:56:38 PDT 2008


I seem to recall havbing asked this before but I can't find it by searching.

What's the right way to clone a Function?  I need to save off the text at a
certain point and spit it out later, after other optimizations have run.  But
I need to spit out the original text, not the optimized version.

What would be the most effective way to do this?

                                                  -Dave



More information about the llvm-dev mailing list