[LLVMdev] ParseAssemblyString change of behaviour
Jan Rehders
wurstgebaeck at googlemail.com
Tue Dec 23 07:15:10 PST 2008
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:
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)
Jan
More information about the llvm-dev
mailing list