[LLVMdev] How to copy a Function

Jianzhou Zhao jianzhou at seas.upenn.edu
Mon May 17 16:41:42 PDT 2010


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.h

Thanks! 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




More information about the llvm-dev mailing list