[LLVMdev] Merging Modules
paul.redmond at intel.com
Mon Sep 12 17:38:04 PDT 2011
Thanks for the advice. Using Linker and CloneModule seems to suit my needs perfectly.
From: Nick Lewycky [mailto:nlewycky at google.com]
Sent: Thursday, September 08, 2011 2:45 PM
To: Devang Patel
Cc: Redmond, Paul; llvmdev at cs.uiuc.edu
Subject: Re: [LLVMdev] Merging Modules
On 8 September 2011 10:57, Devang Patel <dpatel at apple.com<mailto:dpatel at apple.com>> wrote:
On Sep 8, 2011, at 10:52 AM, Redmond, Paul wrote:
Can anyone point me to some code (or offer advice) on how I can merge one Module into another?
I have a list of Modules each containing one Function. I would like to combine them all into one monolithic Module before transforming and optimizing (The original Modules must remain unmodified)
Mm, I think LinkModules is destructive to one of its input modules. Try CloneFunction http://llvm.org/doxygen/namespacellvm.html#aabb040f50a7e75ad8d58bfc5d95636a4 maybe?
LLVM Developers mailing list
LLVMdev at cs.uiuc.edu<mailto:LLVMdev at cs.uiuc.edu> http://llvm.cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev