r272862 - [DebugInfo] Enable generation of unique identifiers for externally visible MS ABI types
Reid Kleckner via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 15 18:21:29 PDT 2016
Author: rnk
Date: Wed Jun 15 20:21:28 2016
New Revision: 272862
URL: http://llvm.org/viewvc/llvm-project?rev=272862&view=rev
Log:
[DebugInfo] Enable generation of unique identifiers for externally visible MS ABI types
We implemented the mangling for this a long time ago.
Added:
cfe/trunk/test/CodeGenCXX/debug-info-ms-abi.cpp
Modified:
cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=272862&r1=272861&r2=272862&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Wed Jun 15 20:21:28 2016
@@ -649,10 +649,6 @@ static SmallString<256> getUniqueTagType
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);
Added: cfe/trunk/test/CodeGenCXX/debug-info-ms-abi.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-ms-abi.cpp?rev=272862&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-ms-abi.cpp (added)
+++ cfe/trunk/test/CodeGenCXX/debug-info-ms-abi.cpp Wed Jun 15 20:21:28 2016
@@ -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 at Foo@@"
More information about the cfe-commits
mailing list