Hi,
here is a patch which fixes the bug for me. I'm not sure the format is
right, I created it using git show (I started from the 2.4 source
release, no svn version here). Let me know if you need some other format
HTH,
Jan
On 23.12.2008, at 23:20, Chris Lattner wrote:
>
> On Dec 23, 2008, at 7:15 AM, Jan Rehders wrote:
>
>> Hi,
>>
>> when upgrading my compiler from LLVM 2.1 to 2.4 I stumbled upon a
>> change of behaviour in ParseAssemblyString. For an interactive
>> toplevel I am generating .ll source and feeding it into
>> ParseAssemblyString like this:
>
> Hi Jan,
>
> I don't think that there is any intentional change here. It sounds
> like a bug.
>
> -Chris
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Original message:> when upgrading my compiler from LLVM 2.1 to 2.4 I stumbled upon a
> change of behaviour in ParseAssemblyString. For an interactive
> toplevel I am generating .ll source and feeding it into
> ParseAssemblyString like this:
>
> Module* parsedModule = ParseAssemblyString( code, targetModule,
> &errorInfo );
>
> where targetModule is the module I expect all the LLVM code to go.
> Until 2.1 the globals, types and functions in code where added to
> targetModule. Since 2.2 this does not happen anymore.
>
> The documentation still states that targetModule is "A module to add
> the assembly too.". Is the new behaviour a bug? If not why has this
> been changed?
>
> And most important for me: how do I work around this? I intend to
> copy the types, globals and functions from the newly parsed module
> into my other module. Is this feasible or is there another
> recommended way? (Using the LLVM API instead of generating .ll
> source is not really practical for me at this time)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm-2.4.patch
Type: application/octet-stream
Size: 1527 bytes
Desc: not available
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20081227/8dfb7233/attachment.obj>