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? -- ┌─── dg@cowlark.com ───── http://www.cowlark.com ───── │ "Thou who might be our Father, who perhaps may be in Heaven, hallowed │ be Thy Name, if Name Thou hast and any desire to see it hallowed..." │ --- _Creatures of Light and Darkness_, Roger Zelazny -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 254 bytes Desc: OpenPGP digital signature URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100911/7fae0d64/attachment.sig>
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
On 11/09/10 19:41, Chris Lattner wrote: [...]>> 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.Excellent --- thanks! -- ┌─── dg@cowlark.com ───── http://www.cowlark.com ───── │ "Thou who might be our Father, who perhaps may be in Heaven, hallowed │ be Thy Name, if Name Thou hast and any desire to see it hallowed..." │ --- _Creatures of Light and Darkness_, Roger Zelazny -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 254 bytes Desc: OpenPGP digital signature URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100911/55d6b051/attachment.sig>