[llvm-commits] [Review request] clang bug 8355: generating wrong code due to incorrect name mangling

Richard Smith richard at metafoo.co.uk
Sun Oct 17 06:12:24 PDT 2010


Hello,

While porting a large C++ codebase to clang, I found a bug where incorrect
code would be generated if two polymorphic classes with the same name were
defined within a function -- specifically, the name mangling code didn't
fall into the <local-name> case and gave the same mangled name for both
vtables. This is filed as bug#8355.

The attached patch corrects this behaviour. I've also changed the
discriminator numbering for local classes to more closely match the
Itanium C++ ABI and g++ -- the numbering is now incremented for each
top-level type within a function, and not for each mangled local name.

I'd appreciate any review comments you might have. Please CC me on any
replies.

Thanks,
Richard Smith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug-8355.diff
Type: text/x-patch
Size: 6625 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20101017/c192abcd/attachment.bin>


More information about the llvm-commits mailing list