[DebugInfo] Enable generation of unique identifiers for externally visible MS ABI types

We implemented the mangling for this a long time ago.

llvm-svn: 272862
This commit is contained in:
Reid Kleckner 2016-06-16 01:21:28 +00:00
parent 87590fae55
commit 45fe376dbd
2 changed files with 13 additions and 4 deletions

View File

@ -649,10 +649,6 @@ static SmallString<256> getUniqueTagTypeName(const TagType *Ty,
if (!hasCXXMangling(TD, TheCU) || !TD->isExternallyVisible())
return FullName;
// Microsoft Mangler does not have support for mangleCXXRTTIName yet.
if (CGM.getTarget().getCXXABI().isMicrosoft())
return FullName;
// TODO: This is using the RTTI name. Is there a better way to get
// a unique string for a type?
llvm::raw_svector_ostream Out(FullName);

View File

@ -0,0 +1,13 @@
// RUN: %clang_cc1 %s -triple=i686-pc-windows-msvc -debug-info-kind=limited -emit-llvm -o - | FileCheck %s
// Tests that certain miscellaneous features work in the MS ABI.
struct Foo {
struct Nested {};
};
Foo f;
Foo::Nested n;
// CHECK: distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Foo",
// CHECK-SAME: identifier: ".?AUFoo@@"
// CHECK: distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Nested",
// CHECK-SAME: identifier: ".?AUNested@Foo@@"