From: Reid Kleckner Date: Thu, 16 Jun 2016 01:21:28 +0000 (+0000) Subject: [DebugInfo] Enable generation of unique identifiers for externally visible MS ABI... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7b5a49b699e71ac558b2d451447f9d86fe25613d;p=clang [DebugInfo] Enable generation of unique identifiers for externally visible MS ABI types We implemented the mangling for this a long time ago. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272862 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 0e756d348c..36d2240672 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -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); diff --git a/test/CodeGenCXX/debug-info-ms-abi.cpp b/test/CodeGenCXX/debug-info-ms-abi.cpp new file mode 100644 index 0000000000..78979952b4 --- /dev/null +++ b/test/CodeGenCXX/debug-info-ms-abi.cpp @@ -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@@"