[LLVMdev] Changes in LLVM 3.4 llc name mangling?
Rafael EspĂndola
rafael.espindola at gmail.com
Mon Feb 3 14:55:08 PST 2014
On 2 February 2014 15:21, Albert Graef <aggraef at gmail.com> wrote:
> Hi,
>
> I've recently ported Pure (http://purelang.bitbucket.org/) to LLVM
> 3.4, and I've run into a problem. I'm using LLVM on a Linux x86_64
> system (Arch). In previous releases llc would automatically mangle
> identifiers in LLVM assembler source code so that the result could be
> assembled with the system assembler of the target platform. E.g., if I
> have LLVM assembler (.ll) code like:
>
> define void @"$(foo)"() {
> ret void
> }
>
> Then the llc from LLVM 3.3 turns the identifier "$(foo)" into
> $_28_foo_29_ in the assembler output code (.s), which is fine.
This change was intentional. The rationale being that there is nothing
in the object format that prevents a symbol name of "$(foo)".
> But in LLVM 3.4 this isn't the case any more, instead the "$(foo)"
> identifier goes through unchanged. It goes without saying that the
> system assembler chokes on this, so I get a bunch of error messages
> when trying to assemble the resulting file.
This is a bug. The asm printer should be adding escapes so that you
would get a symbol named "$(foo)". What is the target triple?
>
> This breaks Pure's batch compiler which assumes that llc does all the
> necessary name mangling.
>
> Was this change intentional? Is it a bug? Is there a way I can get the
> name mangling back in LLVM 3.4? Any help appreciated.
>
> Thanks,
> Albert
Cheers,
Rafael
More information about the llvm-dev
mailing list