Hi, I wanted to backup a Function before it is optimized. The Function class disallows assignment operations as it comments: Function(const Function&); // DO NOT IMPLEMENT void operator=(const Function&); // DO NOT IMPLEMENT Is there a way to construct a copy from an existing Function? Thanks. -- Jianzhou
On May 17, 2010, at 3:36 PM, Jianzhou Zhao wrote:> Hi, > > I wanted to backup a Function before it is optimized. The Function > class disallows assignment operations as it comments: > Function(const Function&); // DO NOT IMPLEMENT > void operator=(const Function&); // DO NOT IMPLEMENT > Is there a way to construct a copy from an existing Function? >CloneFunction() may do what you want. See: llvm/include/llvm/Transforms/Utils/Cloning.h> Thanks. > -- > Jianzhou > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
On Mon, May 17, 2010 at 7:29 PM, Jim Grosbach <grosbach at apple.com> wrote:> > On May 17, 2010, at 3:36 PM, Jianzhou Zhao wrote: > >> Hi, >> >> I wanted to backup a Function before it is optimized. The Function >> class disallows assignment operations as it comments: >> Function(const Function&); // DO NOT IMPLEMENT >> void operator=(const Function&); // DO NOT IMPLEMENT >> Is there a way to construct a copy from an existing Function? >> > > CloneFunction() may do what you want. See: > llvm/include/llvm/Transforms/Utils/Cloning.hThanks! This exactly implemented what I need.> > >> Thanks. >> -- >> Jianzhou >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >-- Jianzhou