[LLVMdev] Valid names for symbols

Chris Lattner clattner at apple.com
Sat Sep 11 11:41:35 PDT 2010


On Sep 11, 2010, at 11:03 AM, David Given wrote:

> What's the set of valid characters that can occur in an LLVM symbol name?
> 
> The reason I ask is that my compiler is generating symbols based on
> method names. Some methods are operators, and I haven't got around to
> mangling the names yet. As a result it's producing symbols that look
> like _f_+ and _f_:=.
> 
> LLVM seems to be coping fine with these so far and the IR output is
> quoting them, producing lines like:
> 
> %7 = call fastcc i32 @"_f_+"(i8* %6, i32 1)
> 
> Should I be mangling the names, or can I rely on LLVM to cope? If so,
> will LLVM correctly mangle the names itself to keep the platform
> assembler happy?

LLVM should be able to handle anything you throw at it.  

-Chris



More information about the llvm-dev mailing list