[LLVMdev] GlobalVaraible and Function have the same name

Chris Lattner clattner at apple.com
Mon Jan 12 10:51:37 PST 2009


On Jan 12, 2009, at 9:35 AM, 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)?

Yes.

>  Is there any way, short of renaming on our end,
> around this? Thanks!

You can use some form of name mangling.  This is what C++ compilers do  
to implement support for overloading.

-Chris



More information about the llvm-dev mailing list