Simon Moll
2011-Aug-13 23:38 UTC
[LLVMdev] patch: CloneModule resets GlobalVariable address space
Hi, I found the following bug in llvm::CloneModule (svn, head revision). When copying over global variables the address space is reset to default. The patch changes that behavior by using the other GlobalVariable constructor that explicitely includes that information. Regards, Simon -------------- next part -------------- A non-text attachment was scrubbed... Name: LLVM29_CloneModule_GVSpace.diff Type: text/x-patch Size: 851 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110814/f31260f1/attachment.bin>
Eli Friedman
2011-Aug-15 21:08 UTC
[LLVMdev] patch: CloneModule resets GlobalVariable address space
On Sat, Aug 13, 2011 at 4:38 PM, Simon Moll <Simon.Moll at dfki.de> wrote:> Hi, > > I found the following bug in llvm::CloneModule (svn, head revision). > When copying over global variables the address space is reset to > default. The patch changes that behavior by using the other > GlobalVariable constructor that explicitely includes that information.r137654 fixes all the issues I could find looking at the code. Note that this codepath is relatively lightly tested, though; the only user of it in the LLVM codebase is bugpoint. -Eli