]> granicus.if.org Git - clang/commitdiff
[DebugInfo] Enable generation of unique identifiers for externally visible MS ABI...
authorReid Kleckner <rnk@google.com>
Thu, 16 Jun 2016 01:21:28 +0000 (01:21 +0000)
committerReid Kleckner <rnk@google.com>
Thu, 16 Jun 2016 01:21:28 +0000 (01:21 +0000)
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

lib/CodeGen/CGDebugInfo.cpp
test/CodeGenCXX/debug-info-ms-abi.cpp [new file with mode: 0644]

index 0e756d348c45b93d55275ddaaaf6d5a1f2b31f90..36d2240672757ddd1788c376c6599121fab1714c 100644 (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);
diff --git a/test/CodeGenCXX/debug-info-ms-abi.cpp b/test/CodeGenCXX/debug-info-ms-abi.cpp
new file mode 100644 (file)
index 0000000..7897995
--- /dev/null
@@ -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@@"