[LLVMdev] Changes in LLVM 3.4 llc name mangling?

Albert Graef aggraef at gmail.com
Sun Feb 2 12:21:38 PST 2014


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.

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 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

-- 
Dr. Albert Gr"af
Dept. of Music-Informatics, University of Mainz, Germany
Email:  aggraef at gmail.com
WWW:    https://plus.google.com/+AlbertGraef



More information about the llvm-dev mailing list