[LLVMdev] GlobalVaraible and Function have the same name
Gordon Henriksen
gordonhenriksen at me.com
Mon Jan 12 12:19:29 PST 2009
On 2009-01-12, at 12:35, Tony Scudiero wrote:
> Am I correct in interpreting this as a constraint that no two items
> in the ValueSymbolTable can have the same name, even if they're of
> entirely different types (in this case Function entry point and
> global variable) ? Is there any way, short of renaming on our end,
> around this? Thanks!
That's correct; LLVM does not support overloading symbols based on
type. Neither does the linker, though. If you're implementing a high
level language, you may need to implement name mangling.
http://en.wikipedia.org/wiki/Name_mangling
— Gordon
More information about the llvm-dev
mailing list