]> granicus.if.org Git - clang/commit
[MS ABI] Complete and base constructor GlobalDecls must have the same name
authorDavid Majnemer <david.majnemer@gmail.com>
Fri, 8 Jan 2016 20:48:26 +0000 (20:48 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Fri, 8 Jan 2016 20:48:26 +0000 (20:48 +0000)
commitb6f500511bbc7571d0b17fcffa473d33100f84b4
treeae6c4344722026033de6c0b4f59f17aff074fe63
parent16b28cc48158574caf0acc8908182002dd1ecff8
[MS ABI] Complete and base constructor GlobalDecls must have the same name

Clang got itself into the situation where we mangled the same
constructor twice with two different constructor types.  After one of
the constructors were utilized, the tag used for one of the types
changed from class to struct because a class template became complete.
This resulted in one of the constructor types varying from the other
constructor.

Instead, force "base" constructor types to "complete" if the ABI doesn't
have constructor variants.  This will ensure that GlobalDecls for both
variants will get the same mangled name.

This fixes PR26029.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@257205 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CodeGenModule.cpp
test/CodeGenCXX/mangle-ms.cpp