https://github.com/Michael137 updated 
https://github.com/llvm/llvm-project/pull/183617

>From 0ac8ba0c9be8188fa93288feb237fc5a39092eb3 Mon Sep 17 00:00:00 2001
From: Michael Buch <[email protected]>
Date: Thu, 26 Feb 2026 20:48:34 +0000
Subject: [PATCH 1/2] [clang][DebugInfo] Rename _vtable$ to __clang_vtable$

Discussion is a follow-up from TBD

`_vtable$` is not a reserved identifier in C or C++. In order for debuggers to 
reliably use this symbol without accidentally reaching into user-identifiers, 
this patch renames it such that it is reserved. The naming follows the style of 
the recently added `__clang_trap_msg` debug-info symbol.
---
 clang/lib/CodeGen/CGDebugInfo.cpp             |  4 +--
 clang/test/DebugInfo/CXX/vtable-external.cpp  | 26 +++++++++----------
 .../CXX/vtable-inheritance-diamond.cpp        | 18 ++++++-------
 .../CXX/vtable-inheritance-multiple.cpp       | 14 +++++-----
 .../CXX/vtable-inheritance-simple-main.cpp    | 18 ++++++-------
 .../CXX/vtable-inheritance-simple.cpp         | 10 +++----
 .../CXX/vtable-inheritance-virtual.cpp        | 18 ++++++-------
 .../CXX/vtable-template-instantiation.cpp     | 24 ++++++++---------
 8 files changed, 66 insertions(+), 66 deletions(-)

diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp 
b/clang/lib/CodeGen/CGDebugInfo.cpp
index 401d8bc16d290..8b9cc0d50c8f0 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -2792,7 +2792,7 @@ StringRef CGDebugInfo::getVTableName(const CXXRecordDecl 
*RD) {
 }
 
 // Emit symbol for the debugger that points to the vtable address for
-// the given class. The symbol is named as '_vtable$'.
+// the given class. The symbol is named as '__clang_vtable$'.
 // The debugger does not need to know any details about the contents of the
 // vtable as it can work this out using its knowledge of the ABI and the
 // existing information in the DWARF. The type is assumed to be 'void *'.
@@ -2815,7 +2815,7 @@ void CGDebugInfo::emitVTableSymbol(llvm::GlobalVariable 
*VTable,
     return;
 
   ASTContext &Context = CGM.getContext();
-  StringRef SymbolName = "_vtable$";
+  StringRef SymbolName = "__clang_vtable$";
   SourceLocation Loc;
   QualType VoidPtr = Context.getPointerType(Context.VoidTy);
 
diff --git a/clang/test/DebugInfo/CXX/vtable-external.cpp 
b/clang/test/DebugInfo/CXX/vtable-external.cpp
index ff8144e740f6f..52c2cfb2e511a 100644
--- a/clang/test/DebugInfo/CXX/vtable-external.cpp
+++ b/clang/test/DebugInfo/CXX/vtable-external.cpp
@@ -1,24 +1,24 @@
 // For the `CInlined` struct, where all member functions are inlined, we check 
the following cases:
 // - If the definition of its destructor is visible:
 //   * The vtable is generated with a COMDAT specifier
-//   * Its '_vtable$' is generated
+//   * Its '__clang_vtable$' is generated
 // - Otherwise:
 //   * The vtable is declared
-//   * Its '_vtable$' is NOT generated
+//   * Its '__clang_vtable$' is NOT generated
 //
 // For the `CNoInline` strcut, where member functions are defined as 
non-inline, we check the following:
 // - Regardless of whether the definition of its destructor is visible or not:
 //   * The vtable is generated
-//   * Its '_vtable$' is generated
+//   * Its '__clang_vtable$' is generated
 //
 // For the `CNoFnDef` struct, where member functions are declared only, we 
check the following:
 // - Regardless of whether the definition of its destructor is visible or not:
 //  # when non-optimized:
 //   * The vtable is declared
-//   * Its '_vtable$' is NOT generated
+//   * Its '__clang_vtable$' is NOT generated
 //  # when optimized even if no LLVM passes:
 //   * The vtable is declared as `available_externally` (which is potentially 
turned into `external` by LLVM passes)
-//   * Its '_vtable$' is generated only if the compiler is targeting the 
non-COFF platforms
+//   * Its '__clang_vtable$' is generated only if the compiler is targeting 
the non-COFF platforms
 
 struct CInlined {
   virtual void f1() noexcept {}
@@ -81,17 +81,17 @@ int main() {
 
 // CHECK-HAS-DTOR: !llvm.dbg.cu
 
-// CHECK-HAS-DTOR-DAG: [[INLINED_VTABLE:![0-9]+]] = distinct 
!DIGlobalVariable(name: "_vtable$", linkageName: "_ZTV8CInlined"
+// CHECK-HAS-DTOR-DAG: [[INLINED_VTABLE:![0-9]+]] = distinct 
!DIGlobalVariable(name: "__clang_vtable$", linkageName: "_ZTV8CInlined"
 // CHECK-HAS-DTOR-DAG: [[INLINED_VTABLE_VAR]] = 
!DIGlobalVariableExpression(var: [[INLINED_VTABLE]], expr: !DIExpression())
 // CHECK-HAS-DTOR-DAG: [[INLINED:![0-9]+]] = distinct !DICompositeType(tag: 
DW_TAG_structure_type, name: "CInlined"
-// CHECK-HAS-DTOR-DAG: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", 
scope: [[INLINED]], file: {{.*}}, baseType: {{![0-9]+}}, flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
+// CHECK-HAS-DTOR-DAG: !DIDerivedType(tag: DW_TAG_variable, name: 
"__clang_vtable$", scope: [[INLINED]], file: {{.*}}, baseType: {{![0-9]+}}, 
flags: DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
 
-// CHECK-HAS-DTOR-DAG: [[NOINLINE_VTABLE:![0-9]+]] = distinct 
!DIGlobalVariable(name: "_vtable$", linkageName: "_ZTV9CNoInline"
+// CHECK-HAS-DTOR-DAG: [[NOINLINE_VTABLE:![0-9]+]] = distinct 
!DIGlobalVariable(name: "__clang_vtable$", linkageName: "_ZTV9CNoInline"
 // CHECK-HAS-DTOR-DAG: [[NOINLINE_VTABLE_VAR]] = 
!DIGlobalVariableExpression(var: [[NOINLINE_VTABLE]], expr: !DIExpression())
 // CHECK-HAS-DTOR-DAG: [[NOINLINE:![0-9]+]] = distinct !DICompositeType(tag: 
DW_TAG_structure_type, name: "CNoInline"
-// CHECK-HAS-DTOR-DAG: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", 
scope: [[NOINLINE]], file: {{.*}}, baseType: {{![0-9]+}}, flags: DIFlagPrivate 
| DIFlagArtificial | DIFlagStaticMember)
+// CHECK-HAS-DTOR-DAG: !DIDerivedType(tag: DW_TAG_variable, name: 
"__clang_vtable$", scope: [[NOINLINE]], file: {{.*}}, baseType: {{![0-9]+}}, 
flags: DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
 
-// CHECK-HAS-DTOR-O1-DAG: [[NOFNDEF_VTABLE:![0-9]+]] = distinct 
!DIGlobalVariable(name: "_vtable$", linkageName: "_ZTV8CNoFnDef"
+// CHECK-HAS-DTOR-O1-DAG: [[NOFNDEF_VTABLE:![0-9]+]] = distinct 
!DIGlobalVariable(name: "__clang_vtable$", linkageName: "_ZTV8CNoFnDef"
 // CHECK-HAS-DTOR-O1-DAG: [[NOFNDEF_VTABLE_VAR]] = 
!DIGlobalVariableExpression(var: [[NOFNDEF_VTABLE]], expr: !DIExpression())
 
 // CHECK-NO-DTOR-NOT: $_ZTV8CInlined
@@ -106,10 +106,10 @@ int main() {
 
 // CHECK-NO-DTOR: !llvm.dbg.cu
 
-// CHECK-NO-DTOR-DAG: [[NOINLINE_VTABLE:![0-9]+]] = distinct 
!DIGlobalVariable(name: "_vtable$", linkageName: "_ZTV9CNoInline"
+// CHECK-NO-DTOR-DAG: [[NOINLINE_VTABLE:![0-9]+]] = distinct 
!DIGlobalVariable(name: "__clang_vtable$", linkageName: "_ZTV9CNoInline"
 // CHECK-NO-DTOR-DAG: [[NOINLINE_VTABLE_VAR]] = 
!DIGlobalVariableExpression(var: [[NOINLINE_VTABLE]], expr: !DIExpression())
 // CHECK-NO-DTOR-DAG: [[NOINLINE:![0-9]+]] = distinct !DICompositeType(tag: 
DW_TAG_structure_type, name: "CNoInline"
-// CHECK-NO-DTOR-DAG: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", 
scope: [[NOINLINE]], file: {{.*}}, baseType: {{![0-9]+}}, flags: DIFlagPrivate 
| DIFlagArtificial | DIFlagStaticMember)
+// CHECK-NO-DTOR-DAG: !DIDerivedType(tag: DW_TAG_variable, name: 
"__clang_vtable$", scope: [[NOINLINE]], file: {{.*}}, baseType: {{![0-9]+}}, 
flags: DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
 
-// CHECK-NO-DTOR-O1-DAG: [[NOFNDEF_VTABLE:![0-9]+]] = distinct 
!DIGlobalVariable(name: "_vtable$", linkageName: "_ZTV8CNoFnDef"
+// CHECK-NO-DTOR-O1-DAG: [[NOFNDEF_VTABLE:![0-9]+]] = distinct 
!DIGlobalVariable(name: "__clang_vtable$", linkageName: "_ZTV8CNoFnDef"
 // CHECK-NO-DTOR-O1-DAG: [[NOFNDEF_VTABLE_VAR]] = 
!DIGlobalVariableExpression(var: [[NOFNDEF_VTABLE]], expr: !DIExpression())
diff --git a/clang/test/DebugInfo/CXX/vtable-inheritance-diamond.cpp 
b/clang/test/DebugInfo/CXX/vtable-inheritance-diamond.cpp
index e9dc4c1c122ea..bd331b58aaf6c 100644
--- a/clang/test/DebugInfo/CXX/vtable-inheritance-diamond.cpp
+++ b/clang/test/DebugInfo/CXX/vtable-inheritance-diamond.cpp
@@ -1,7 +1,7 @@
 // Diamond inheritance case:
 // For CBase, CLeft, CRight and CDerived we check:
 // - Generation of their vtables (including attributes).
-// - Generation of their '_vtable$' data members:
+// - Generation of their '__clang_vtable$' data members:
 //   * Correct scope and attributes
 
 namespace NSP {
@@ -58,31 +58,31 @@ int main() {
 // CHECK: @_ZTV8CDerived = linkonce_odr {{.*}}unnamed_addr constant {{.*}}, 
comdat, align 8, !dbg [[DERIVED_VTABLE_VAR:![0-9]*]]
 
 // CHECK: [[BASE_VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[BASE_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[BASE_VTABLE]] = distinct !DIGlobalVariable(name: "_vtable$", 
linkageName: "_ZTVN3NSP5CBaseE"
+// CHECK-NEXT: [[BASE_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTVN3NSP5CBaseE"
 
 // CHECK: [[LEFT_VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[LEFT_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[LEFT_VTABLE]] = distinct !DIGlobalVariable(name: "_vtable$", 
linkageName: "_ZTVN5NSP_15CLeftE"
+// CHECK-NEXT: [[LEFT_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTVN5NSP_15CLeftE"
 
 // CHECK: [[TYPE:![0-9]*]] = !DIDerivedType(tag: DW_TAG_pointer_type, 
baseType: null, size: 64)
 
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: 
[[LEFT:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
+// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", scope: 
[[LEFT:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
 
 // CHECK: [[LEFT]] = distinct !DICompositeType(tag: DW_TAG_structure_type, 
name: "CLeft"
 
 // CHECK: [[BASE:![0-9]*]] = distinct !DICompositeType(tag: 
DW_TAG_structure_type, name: "CBase"
 
 // CHECK: [[RIGHT_VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[RIGHT_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[RIGHT_VTABLE]] = distinct !DIGlobalVariable(name: "_vtable$", 
linkageName: "_ZTVN5NSP_26CRightE"
+// CHECK-NEXT: [[RIGHT_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTVN5NSP_26CRightE"
 
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: 
[[RIGHT:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
+// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", scope: 
[[RIGHT:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
 
 // CHECK: [[RIGHT]] = distinct !DICompositeType(tag: DW_TAG_structure_type, 
name: "CRight"
 
 // CHECK: [[DERIVED_VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[DERIVED_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[DERIVED_VTABLE]] = distinct !DIGlobalVariable(name: 
"_vtable$", linkageName: "_ZTV8CDerived"
+// CHECK-NEXT: [[DERIVED_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTV8CDerived"
 
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: 
[[DERIVED:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
+// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", scope: 
[[DERIVED:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
 
 // CHECK: [[DERIVED]] = distinct !DICompositeType(tag: DW_TAG_structure_type, 
name: "CDerived"
 
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: 
[[BASE]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
+// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", scope: 
[[BASE]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
diff --git a/clang/test/DebugInfo/CXX/vtable-inheritance-multiple.cpp 
b/clang/test/DebugInfo/CXX/vtable-inheritance-multiple.cpp
index 62bc18d58bb5f..7079f06a8fbbd 100644
--- a/clang/test/DebugInfo/CXX/vtable-inheritance-multiple.cpp
+++ b/clang/test/DebugInfo/CXX/vtable-inheritance-multiple.cpp
@@ -1,7 +1,7 @@
 // Multiple inheritance case:
 // For CBaseOne, CBaseTwo and CDerived we check:
 // - Generation of their vtables (including attributes).
-// - Generation of their '_vtable$' data members:
+// - Generation of their '__clang_vtable$' data members:
 //   * Correct scope and attributes
 
 namespace NSP_1 {
@@ -50,24 +50,24 @@ int main() {
 // CHECK: @_ZTV8CDerived = linkonce_odr {{.*}}unnamed_addr constant {{.*}}, 
comdat, align 8, !dbg [[DERIVED_VTABLE_VAR:![0-9]*]]
 
 // CHECK: [[BASE_ONE_VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[BASE_ONE_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[BASE_ONE_VTABLE]] = distinct !DIGlobalVariable(name: 
"_vtable$", linkageName: "_ZTVN5NSP_18CBaseOneE"
+// CHECK-NEXT: [[BASE_ONE_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTVN5NSP_18CBaseOneE"
 
 // CHECK: [[BASE_TWO_VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[BASE_TWO_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[BASE_TWO_VTABLE]] = distinct !DIGlobalVariable(name: 
"_vtable$", linkageName: "_ZTVN5NSP_28CBaseTwoE"
+// CHECK-NEXT: [[BASE_TWO_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTVN5NSP_28CBaseTwoE"
 
 // CHECK: [[TYPE:![0-9]*]] = !DIDerivedType(tag: DW_TAG_pointer_type, 
baseType: null, size: 64)
 
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: 
[[BASE_TWO:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
+// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", scope: 
[[BASE_TWO:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
 
 // check: [[BASE_TWO]] = distinct !DICompositeType(tag: DW_TAG_structure_type, 
name: "CBaseTwo"
 
 // CHECK: [[DERIVED_VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[DERIVED_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK: [[DERIVED_VTABLE]] = distinct !DIGlobalVariable(name: "_vtable$", 
linkageName: "_ZTV8CDerived"
+// CHECK: [[DERIVED_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTV8CDerived"
 
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: 
[[DERIVED:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
+// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", scope: 
[[DERIVED:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
 
 // CHECK: [[DERIVED]] = distinct !DICompositeType(tag: DW_TAG_structure_type, 
name: "CDerived"
 
 // CHECK: [[BASE_ONE:![0-9]*]] = distinct !DICompositeType(tag: 
DW_TAG_structure_type, name: "CBaseOne"
 
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: 
[[BASE_ONE]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
+// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", scope: 
[[BASE_ONE]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
diff --git a/clang/test/DebugInfo/CXX/vtable-inheritance-simple-main.cpp 
b/clang/test/DebugInfo/CXX/vtable-inheritance-simple-main.cpp
index 19752eb37f5a8..d23a9bcbf115b 100644
--- a/clang/test/DebugInfo/CXX/vtable-inheritance-simple-main.cpp
+++ b/clang/test/DebugInfo/CXX/vtable-inheritance-simple-main.cpp
@@ -1,7 +1,7 @@
 // Simple inheritance case:
 // For CBase and CDerived we check:
 // - Generation of their vtables (including attributes).
-// - Generation of their '_vtable$' data members:
+// - Generation of their '__clang_vtable$' data members:
 //   * Correct scope and attributes
 
 #ifdef BASE_CODE
@@ -139,17 +139,17 @@ int main() {
 // CHECK-ONE: @_ZTVN3NSP5CBaseE = {{.*}}unnamed_addr constant {{.*}}, align 8, 
!dbg [[BASE_VTABLE_VAR:![0-9]*]]
 
 // CHECK-ONE: [[DERIVED_VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[DERIVED_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-ONE-NEXT: [[DERIVED_VTABLE]] = distinct !DIGlobalVariable(name: 
"_vtable$", linkageName: "_ZTV8CDerived"
+// CHECK-ONE-NEXT: [[DERIVED_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTV8CDerived"
 
 // CHECK-ONE: [[TYPE:![0-9]*]] = !DIDerivedType(tag: DW_TAG_pointer_type, 
baseType: null, size: 64)
 
-// CHECK-ONE: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: 
[[DERIVED:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
+// CHECK-ONE: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", 
scope: [[DERIVED:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: 
DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
 // CHECK-ONE: [[DERIVED]] = distinct !DICompositeType(tag: 
DW_TAG_structure_type, name: "CDerived"
 
 // CHECK-ONE: [[BASE_VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[BASE_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-ONE-NEXT: [[BASE_VTABLE]] = distinct !DIGlobalVariable(name: 
"_vtable$", linkageName: "_ZTVN3NSP5CBaseE"
+// CHECK-ONE-NEXT: [[BASE_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTVN3NSP5CBaseE"
 
-// CHECK-ONE: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: 
[[BASE:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
+// CHECK-ONE: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", 
scope: [[BASE:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate 
| DIFlagArtificial | DIFlagStaticMember)
 // CHECK-ONE: [[BASE]] = distinct !DICompositeType(tag: DW_TAG_structure_type, 
name: "CBase"
 
 // CHECK-TWO: ${{_ZN3NSP5CBaseC2Ev|_ZN8CDerivedC2Ev}} = comdat any
@@ -159,16 +159,16 @@ int main() {
 // CHECK-TWO: @_ZTV8CDerived = {{.*}}unnamed_addr constant {{.*}}, align 8, 
!dbg [[DERIVED_VTABLE_VAR:![0-9]*]]
 
 // CHECK-TWO: [[BASE_VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[BASE_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-TWO-NEXT: [[BASE_VTABLE]] = distinct !DIGlobalVariable(name: 
"_vtable$", linkageName: "_ZTVN3NSP5CBaseE"
+// CHECK-TWO-NEXT: [[BASE_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTVN3NSP5CBaseE"
 
 // CHECK-TWO: [[TYPE:![0-9]*]] = !DIDerivedType(tag: DW_TAG_pointer_type, 
baseType: null, size: 64)
 
-// CHECK-TWO: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: 
[[BASE:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
+// CHECK-TWO: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", 
scope: [[BASE:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate 
| DIFlagArtificial | DIFlagStaticMember)
 // CHECK-TWO: [[BASE]] = distinct !DICompositeType(tag: DW_TAG_structure_type, 
name: "CBase"
 
 // CHECK-TWO: [[DERIVED_VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[DERIVED_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-TWO-NEXT: [[DERIVED_VTABLE]] = distinct !DIGlobalVariable(name: 
"_vtable$", linkageName: "_ZTV8CDerived"
+// CHECK-TWO-NEXT: [[DERIVED_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTV8CDerived"
 
-// CHECK-TWO: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: 
[[DERIVED:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
+// CHECK-TWO: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", 
scope: [[DERIVED:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: 
DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
 
 // CHECK-TWO: [[DERIVED]] = distinct !DICompositeType(tag: 
DW_TAG_structure_type, name: "CDerived"
diff --git a/clang/test/DebugInfo/CXX/vtable-inheritance-simple.cpp 
b/clang/test/DebugInfo/CXX/vtable-inheritance-simple.cpp
index d2c6d41527202..fd1458c5b1fa3 100644
--- a/clang/test/DebugInfo/CXX/vtable-inheritance-simple.cpp
+++ b/clang/test/DebugInfo/CXX/vtable-inheritance-simple.cpp
@@ -1,7 +1,7 @@
 // Simple inheritance case:
 // For CBase and CDerived we check:
 // - Generation of their vtables (including attributes).
-// - Generation of their '_vtable$' data members:
+// - Generation of their '__clang_vtable$' data members:
 //   * Correct scope and attributes
 
 namespace NSP {
@@ -40,17 +40,17 @@ int main() {
 // CHECK: @_ZTV8CDerived = linkonce_odr {{.*}}unnamed_addr constant {{.*}}, 
comdat, align 8, !dbg [[DERIVED_VTABLE_VAR:![0-9]*]]
 
 // CHECK: [[BASE_VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[BASE_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[BASE_VTABLE]] = distinct !DIGlobalVariable(name: "_vtable$", 
linkageName: "_ZTVN3NSP5CBaseE"
+// CHECK-NEXT: [[BASE_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTVN3NSP5CBaseE"
 
 // CHECK: [[DERIVED_VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[DERIVED_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[DERIVED_VTABLE]] = distinct !DIGlobalVariable(name: 
"_vtable$", linkageName: "_ZTV8CDerived"
+// CHECK-NEXT: [[DERIVED_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTV8CDerived"
 
 // CHECK: [[TYPE:![0-9]*]] = !DIDerivedType(tag: DW_TAG_pointer_type, 
baseType: null, size: 64)
 
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: 
[[DERIVED:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
+// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", scope: 
[[DERIVED:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
 
 // CHECK: [[DERIVED]] = distinct !DICompositeType(tag: DW_TAG_structure_type, 
name: "CDerived"
 
 // CHECK: [[BASE:![0-9]*]] = distinct !DICompositeType(tag: 
DW_TAG_structure_type, name: "CBase"
 
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: 
[[BASE]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
+// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", scope: 
[[BASE]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
diff --git a/clang/test/DebugInfo/CXX/vtable-inheritance-virtual.cpp 
b/clang/test/DebugInfo/CXX/vtable-inheritance-virtual.cpp
index 9aac8ddc03e88..926eca9a48a4d 100644
--- a/clang/test/DebugInfo/CXX/vtable-inheritance-virtual.cpp
+++ b/clang/test/DebugInfo/CXX/vtable-inheritance-virtual.cpp
@@ -1,7 +1,7 @@
 // Virtual inheritance case:
 // For CBase, CLeft, CRight and CDerived we check:
 // - Generation of their vtables (including attributes).
-// - Generation of their '_vtable$' data members:
+// - Generation of their '__clang_vtable$' data members:
 //   * Correct scope and attributes
 
 namespace NSP {
@@ -58,31 +58,31 @@ int main() {
 // CHECK: @_ZTV8CDerived = linkonce_odr {{.*}}unnamed_addr constant {{.*}}, 
comdat, align 8, !dbg [[DERIVED_VTABLE_VAR:![0-9]*]]
 
 // CHECK: [[BASE_VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[BASE_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[BASE_VTABLE]] = distinct !DIGlobalVariable(name: "_vtable$", 
linkageName: "_ZTVN3NSP5CBaseE"
+// CHECK-NEXT: [[BASE_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTVN3NSP5CBaseE"
 
 // CHECK: [[LEFT_VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[LEFT_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[LEFT_VTABLE]] = distinct !DIGlobalVariable(name: "_vtable$", 
linkageName: "_ZTVN5NSP_15CLeftE"
+// CHECK-NEXT: [[LEFT_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTVN5NSP_15CLeftE"
 
 // CHECK: [[TYPE:![0-9]*]] = !DIDerivedType(tag: DW_TAG_pointer_type, 
baseType: null, size: 64)
 
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: 
[[LEFT:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
+// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", scope: 
[[LEFT:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
 
 // CHECK: [[LEFT]] = distinct !DICompositeType(tag: DW_TAG_structure_type, 
name: "CLeft"
 
 // CHECK: [[BASE:![0-9]*]] = distinct !DICompositeType(tag: 
DW_TAG_structure_type, name: "CBase"
 
 // CHECK: [[RIGHT_VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[RIGHT_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[RIGHT_VTABLE]] = distinct !DIGlobalVariable(name: "_vtable$", 
linkageName: "_ZTVN5NSP_26CRightE"
+// CHECK-NEXT: [[RIGHT_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTVN5NSP_26CRightE"
 
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: 
[[RIGHT:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
+// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", scope: 
[[RIGHT:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
 
 // CHECK: [[RIGHT]] = distinct !DICompositeType(tag: DW_TAG_structure_type, 
name: "CRight"
 
 // CHECK: [[DERIVED_VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[DERIVED_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[DERIVED_VTABLE]] = distinct !DIGlobalVariable(name: 
"_vtable$", linkageName: "_ZTV8CDerived"
+// CHECK-NEXT: [[DERIVED_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTV8CDerived"
 
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: 
[[DERIVED:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
+// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", scope: 
[[DERIVED:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
 
 // CHECK: [[DERIVED]] = distinct !DICompositeType(tag: DW_TAG_structure_type, 
name: "CDerived"
 
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: 
[[BASE]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
+// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", scope: 
[[BASE]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
diff --git a/clang/test/DebugInfo/CXX/vtable-template-instantiation.cpp 
b/clang/test/DebugInfo/CXX/vtable-template-instantiation.cpp
index 0eb1cfec01c36..966373017b526 100644
--- a/clang/test/DebugInfo/CXX/vtable-template-instantiation.cpp
+++ b/clang/test/DebugInfo/CXX/vtable-template-instantiation.cpp
@@ -2,17 +2,17 @@
 // - Implicitly instantiated whole class by up-casting (`NOCAST` not defined)
 //   or implicitly instantiated member functions only (`NOCAST` defined):
 //   * The vtable is generated with a COMDAT specifier
-//   * Its '_vtable$' is generated
+//   * Its '__clang_vtable$' is generated
 // - Define explicitly instantiation (`EXPLICIT` defined):
 //   * The vtable is generated with a COMDAT specifier
-//   * Its '_vtable$' is generated
+//   * Its '__clang_vtable$' is generated
 // - Declare explicitly instantiation as `extern` (`EXTERN` defined):
 //  # when non-optimized:
 //   * The vtable is declared
-//   * Its '_vtable$' is NOT generated
+//   * Its '__clang_vtable$' is NOT generated
 //  # when optimized even if no LLVM passes
 //   * The vtable is declared as `available_externally` (which is potentially 
turned into `external` by LLVM passes)
-//   * Its '_vtable$' is generated only if the compiler is targeting the 
non-COFF platforms
+//   * Its '__clang_vtable$' is generated only if the compiler is targeting 
the non-COFF platforms
 
 struct CBase {
   virtual void f() noexcept {}
@@ -68,18 +68,18 @@ int main() {
 
 // IMPLICIT: $_ZTV9CTemplateIvE = comdat any
 // IMPLICIT: @_ZTV9CTemplateIvE = linkonce_odr {{.*}}unnamed_addr constant {{{ 
\[[^]]*\] } { \[[^]]*\] \[[^]]*\] }}}, comdat, align 8, !dbg 
[[VTABLE_VAR:![0-9]*]]
-// IMPLICIT-DAG: [[VTABLE:![0-9]+]] = distinct !DIGlobalVariable(name: 
"_vtable$", linkageName: "_ZTV9CTemplateIvE"
+// IMPLICIT-DAG: [[VTABLE:![0-9]+]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTV9CTemplateIvE"
 // IMPLICIT-DAG: !DIGlobalVariableExpression(var: [[VTABLE]], expr: 
!DIExpression())
 // IMPLICIT-DAG: [[TYPE:![0-9]+]] = distinct !DICompositeType(tag: 
DW_TAG_structure_type, name: "CTemplate<void>"
-// IMPLICIT-DAG: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: 
[[TYPE]], file: {{.*}}, baseType: [[PVOID:![0-9]+]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
+// IMPLICIT-DAG: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", 
scope: [[TYPE]], file: {{.*}}, baseType: [[PVOID:![0-9]+]], flags: 
DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
 // IMPLICIT-DAG: [[PVOID]] = !DIDerivedType(tag: DW_TAG_pointer_type, 
baseType: null, size: 64)
 
 // EXPLICIT: $_ZTV9CTemplateIvE = comdat any
 // EXPLICIT: @_ZTV9CTemplateIvE = weak_odr {{.*}}unnamed_addr constant {{{ 
\[[^]]*\] } { \[[^]]*\] \[[^]]*\] }}}, comdat, align 8, !dbg 
[[VTABLE_VAR:![0-9]*]]
-// EXPLICIT-DAG: [[VTABLE:![0-9]+]] = distinct !DIGlobalVariable(name: 
"_vtable$", linkageName: "_ZTV9CTemplateIvE"
+// EXPLICIT-DAG: [[VTABLE:![0-9]+]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTV9CTemplateIvE"
 // EXPLICIT-DAG: [[VTABLE_VAR]] = !DIGlobalVariableExpression(var: [[VTABLE]], 
expr: !DIExpression())
 // EXPLICIT-DAG: [[TYPE:![0-9]+]] = distinct !DICompositeType(tag: 
DW_TAG_structure_type, name: "CTemplate<void>"
-// EXPLICIT-DAG: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", scope: 
[[TYPE]], file: {{.*}}, baseType: [[PVOID:![0-9]+]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
+// EXPLICIT-DAG: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", 
scope: [[TYPE]], file: {{.*}}, baseType: [[PVOID:![0-9]+]], flags: 
DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
 // EXPLICIT-DAG: [[PVOID]] = !DIDerivedType(tag: DW_TAG_pointer_type, 
baseType: null, size: 64)
 
 // EXTERN-NOT: $_ZTV9CTemplateIvE
@@ -88,10 +88,10 @@ int main() {
 // EXTERN-O1-NODBG: @_ZTV9CTemplateIvE = available_externally 
{{.*}}unnamed_addr constant {{{ \[[^]]*\] } { \[[^]]*\] \[[^]]*\] }}}, align 
8{{$}}
 // EXTERN-NODBG-DAG: [[TYPE:![0-9]+]] = !DICompositeType(tag: 
DW_TAG_structure_type, name: "CTemplate<void>"
 // EXTERN-NODBG-DAG: !DICompileUnit
-// EXTERN-NODBG-NOT: !DIGlobalVariable(name: "_vtable$", linkageName: 
"_ZTV9CTemplateIvE"
-// EXTERN-NODBG-NOT: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", 
scope: [[TYPE]], file: {{.*}}, baseType: [[PVOID:![0-9]+]], flags: 
DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
-// EXTERN-DBG-DAG: [[VTABLE:![0-9]+]] = distinct !DIGlobalVariable(name: 
"_vtable$", linkageName: "_ZTV9CTemplateIvE"
+// EXTERN-NODBG-NOT: !DIGlobalVariable(name: "__clang_vtable$", linkageName: 
"_ZTV9CTemplateIvE"
+// EXTERN-NODBG-NOT: !DIDerivedType(tag: DW_TAG_variable, name: 
"__clang_vtable$", scope: [[TYPE]], file: {{.*}}, baseType: [[PVOID:![0-9]+]], 
flags: DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
+// EXTERN-DBG-DAG: [[VTABLE:![0-9]+]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTV9CTemplateIvE"
 // EXTERN-DBG-DAG: [[VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[VTABLE]], expr: !DIExpression())
 // EXTERN-DBG-DAG: [[TYPE:![0-9]+]] = !DICompositeType(tag: 
DW_TAG_structure_type, name: "CTemplate<void>"
-// EXTERN-DBG-DAG: !DIDerivedType(tag: DW_TAG_variable, name: "_vtable$", 
scope: [[TYPE]], file: {{.*}}, baseType: [[PVOID:![0-9]+]], flags: 
DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
+// EXTERN-DBG-DAG: !DIDerivedType(tag: DW_TAG_variable, name: 
"__clang_vtable$", scope: [[TYPE]], file: {{.*}}, baseType: [[PVOID:![0-9]+]], 
flags: DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
 // EXTERN-DBG-DAG: [[PVOID]] = !DIDerivedType(tag: DW_TAG_pointer_type, 
baseType: null, size: 64)

>From 4b519c8ecb8e1b897f85616a2f42b22cbc84f304 Mon Sep 17 00:00:00 2001
From: Michael Buch <[email protected]>
Date: Fri, 27 Feb 2026 13:22:49 +0000
Subject: [PATCH 2/2] fixup! remove '$' suffix

---
 clang/lib/CodeGen/CGDebugInfo.cpp             |  4 +--
 clang/test/DebugInfo/CXX/vtable-external.cpp  | 26 +++++++++----------
 .../CXX/vtable-inheritance-diamond.cpp        | 18 ++++++-------
 .../CXX/vtable-inheritance-multiple.cpp       | 14 +++++-----
 .../CXX/vtable-inheritance-simple-main.cpp    | 18 ++++++-------
 .../CXX/vtable-inheritance-simple.cpp         | 10 +++----
 .../CXX/vtable-inheritance-virtual.cpp        | 18 ++++++-------
 .../CXX/vtable-template-instantiation.cpp     | 24 ++++++++---------
 8 files changed, 66 insertions(+), 66 deletions(-)

diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp 
b/clang/lib/CodeGen/CGDebugInfo.cpp
index 8b9cc0d50c8f0..ebe5324e89544 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -2792,7 +2792,7 @@ StringRef CGDebugInfo::getVTableName(const CXXRecordDecl 
*RD) {
 }
 
 // Emit symbol for the debugger that points to the vtable address for
-// the given class. The symbol is named as '__clang_vtable$'.
+// the given class. The symbol is named as '__clang_vtable'.
 // The debugger does not need to know any details about the contents of the
 // vtable as it can work this out using its knowledge of the ABI and the
 // existing information in the DWARF. The type is assumed to be 'void *'.
@@ -2815,7 +2815,7 @@ void CGDebugInfo::emitVTableSymbol(llvm::GlobalVariable 
*VTable,
     return;
 
   ASTContext &Context = CGM.getContext();
-  StringRef SymbolName = "__clang_vtable$";
+  StringRef SymbolName = "__clang_vtable";
   SourceLocation Loc;
   QualType VoidPtr = Context.getPointerType(Context.VoidTy);
 
diff --git a/clang/test/DebugInfo/CXX/vtable-external.cpp 
b/clang/test/DebugInfo/CXX/vtable-external.cpp
index 52c2cfb2e511a..0a577790796dd 100644
--- a/clang/test/DebugInfo/CXX/vtable-external.cpp
+++ b/clang/test/DebugInfo/CXX/vtable-external.cpp
@@ -1,24 +1,24 @@
 // For the `CInlined` struct, where all member functions are inlined, we check 
the following cases:
 // - If the definition of its destructor is visible:
 //   * The vtable is generated with a COMDAT specifier
-//   * Its '__clang_vtable$' is generated
+//   * Its '__clang_vtable' is generated
 // - Otherwise:
 //   * The vtable is declared
-//   * Its '__clang_vtable$' is NOT generated
+//   * Its '__clang_vtable' is NOT generated
 //
 // For the `CNoInline` strcut, where member functions are defined as 
non-inline, we check the following:
 // - Regardless of whether the definition of its destructor is visible or not:
 //   * The vtable is generated
-//   * Its '__clang_vtable$' is generated
+//   * Its '__clang_vtable' is generated
 //
 // For the `CNoFnDef` struct, where member functions are declared only, we 
check the following:
 // - Regardless of whether the definition of its destructor is visible or not:
 //  # when non-optimized:
 //   * The vtable is declared
-//   * Its '__clang_vtable$' is NOT generated
+//   * Its '__clang_vtable' is NOT generated
 //  # when optimized even if no LLVM passes:
 //   * The vtable is declared as `available_externally` (which is potentially 
turned into `external` by LLVM passes)
-//   * Its '__clang_vtable$' is generated only if the compiler is targeting 
the non-COFF platforms
+//   * Its '__clang_vtable' is generated only if the compiler is targeting the 
non-COFF platforms
 
 struct CInlined {
   virtual void f1() noexcept {}
@@ -81,17 +81,17 @@ int main() {
 
 // CHECK-HAS-DTOR: !llvm.dbg.cu
 
-// CHECK-HAS-DTOR-DAG: [[INLINED_VTABLE:![0-9]+]] = distinct 
!DIGlobalVariable(name: "__clang_vtable$", linkageName: "_ZTV8CInlined"
+// CHECK-HAS-DTOR-DAG: [[INLINED_VTABLE:![0-9]+]] = distinct 
!DIGlobalVariable(name: "__clang_vtable", linkageName: "_ZTV8CInlined"
 // CHECK-HAS-DTOR-DAG: [[INLINED_VTABLE_VAR]] = 
!DIGlobalVariableExpression(var: [[INLINED_VTABLE]], expr: !DIExpression())
 // CHECK-HAS-DTOR-DAG: [[INLINED:![0-9]+]] = distinct !DICompositeType(tag: 
DW_TAG_structure_type, name: "CInlined"
-// CHECK-HAS-DTOR-DAG: !DIDerivedType(tag: DW_TAG_variable, name: 
"__clang_vtable$", scope: [[INLINED]], file: {{.*}}, baseType: {{![0-9]+}}, 
flags: DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
+// CHECK-HAS-DTOR-DAG: !DIDerivedType(tag: DW_TAG_variable, name: 
"__clang_vtable", scope: [[INLINED]], file: {{.*}}, baseType: {{![0-9]+}}, 
flags: DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
 
-// CHECK-HAS-DTOR-DAG: [[NOINLINE_VTABLE:![0-9]+]] = distinct 
!DIGlobalVariable(name: "__clang_vtable$", linkageName: "_ZTV9CNoInline"
+// CHECK-HAS-DTOR-DAG: [[NOINLINE_VTABLE:![0-9]+]] = distinct 
!DIGlobalVariable(name: "__clang_vtable", linkageName: "_ZTV9CNoInline"
 // CHECK-HAS-DTOR-DAG: [[NOINLINE_VTABLE_VAR]] = 
!DIGlobalVariableExpression(var: [[NOINLINE_VTABLE]], expr: !DIExpression())
 // CHECK-HAS-DTOR-DAG: [[NOINLINE:![0-9]+]] = distinct !DICompositeType(tag: 
DW_TAG_structure_type, name: "CNoInline"
-// CHECK-HAS-DTOR-DAG: !DIDerivedType(tag: DW_TAG_variable, name: 
"__clang_vtable$", scope: [[NOINLINE]], file: {{.*}}, baseType: {{![0-9]+}}, 
flags: DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
+// CHECK-HAS-DTOR-DAG: !DIDerivedType(tag: DW_TAG_variable, name: 
"__clang_vtable", scope: [[NOINLINE]], file: {{.*}}, baseType: {{![0-9]+}}, 
flags: DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
 
-// CHECK-HAS-DTOR-O1-DAG: [[NOFNDEF_VTABLE:![0-9]+]] = distinct 
!DIGlobalVariable(name: "__clang_vtable$", linkageName: "_ZTV8CNoFnDef"
+// CHECK-HAS-DTOR-O1-DAG: [[NOFNDEF_VTABLE:![0-9]+]] = distinct 
!DIGlobalVariable(name: "__clang_vtable", linkageName: "_ZTV8CNoFnDef"
 // CHECK-HAS-DTOR-O1-DAG: [[NOFNDEF_VTABLE_VAR]] = 
!DIGlobalVariableExpression(var: [[NOFNDEF_VTABLE]], expr: !DIExpression())
 
 // CHECK-NO-DTOR-NOT: $_ZTV8CInlined
@@ -106,10 +106,10 @@ int main() {
 
 // CHECK-NO-DTOR: !llvm.dbg.cu
 
-// CHECK-NO-DTOR-DAG: [[NOINLINE_VTABLE:![0-9]+]] = distinct 
!DIGlobalVariable(name: "__clang_vtable$", linkageName: "_ZTV9CNoInline"
+// CHECK-NO-DTOR-DAG: [[NOINLINE_VTABLE:![0-9]+]] = distinct 
!DIGlobalVariable(name: "__clang_vtable", linkageName: "_ZTV9CNoInline"
 // CHECK-NO-DTOR-DAG: [[NOINLINE_VTABLE_VAR]] = 
!DIGlobalVariableExpression(var: [[NOINLINE_VTABLE]], expr: !DIExpression())
 // CHECK-NO-DTOR-DAG: [[NOINLINE:![0-9]+]] = distinct !DICompositeType(tag: 
DW_TAG_structure_type, name: "CNoInline"
-// CHECK-NO-DTOR-DAG: !DIDerivedType(tag: DW_TAG_variable, name: 
"__clang_vtable$", scope: [[NOINLINE]], file: {{.*}}, baseType: {{![0-9]+}}, 
flags: DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
+// CHECK-NO-DTOR-DAG: !DIDerivedType(tag: DW_TAG_variable, name: 
"__clang_vtable", scope: [[NOINLINE]], file: {{.*}}, baseType: {{![0-9]+}}, 
flags: DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
 
-// CHECK-NO-DTOR-O1-DAG: [[NOFNDEF_VTABLE:![0-9]+]] = distinct 
!DIGlobalVariable(name: "__clang_vtable$", linkageName: "_ZTV8CNoFnDef"
+// CHECK-NO-DTOR-O1-DAG: [[NOFNDEF_VTABLE:![0-9]+]] = distinct 
!DIGlobalVariable(name: "__clang_vtable", linkageName: "_ZTV8CNoFnDef"
 // CHECK-NO-DTOR-O1-DAG: [[NOFNDEF_VTABLE_VAR]] = 
!DIGlobalVariableExpression(var: [[NOFNDEF_VTABLE]], expr: !DIExpression())
diff --git a/clang/test/DebugInfo/CXX/vtable-inheritance-diamond.cpp 
b/clang/test/DebugInfo/CXX/vtable-inheritance-diamond.cpp
index bd331b58aaf6c..bade3e47f49e3 100644
--- a/clang/test/DebugInfo/CXX/vtable-inheritance-diamond.cpp
+++ b/clang/test/DebugInfo/CXX/vtable-inheritance-diamond.cpp
@@ -1,7 +1,7 @@
 // Diamond inheritance case:
 // For CBase, CLeft, CRight and CDerived we check:
 // - Generation of their vtables (including attributes).
-// - Generation of their '__clang_vtable$' data members:
+// - Generation of their '__clang_vtable' data members:
 //   * Correct scope and attributes
 
 namespace NSP {
@@ -58,31 +58,31 @@ int main() {
 // CHECK: @_ZTV8CDerived = linkonce_odr {{.*}}unnamed_addr constant {{.*}}, 
comdat, align 8, !dbg [[DERIVED_VTABLE_VAR:![0-9]*]]
 
 // CHECK: [[BASE_VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[BASE_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[BASE_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTVN3NSP5CBaseE"
+// CHECK-NEXT: [[BASE_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable", linkageName: "_ZTVN3NSP5CBaseE"
 
 // CHECK: [[LEFT_VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[LEFT_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[LEFT_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTVN5NSP_15CLeftE"
+// CHECK-NEXT: [[LEFT_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable", linkageName: "_ZTVN5NSP_15CLeftE"
 
 // CHECK: [[TYPE:![0-9]*]] = !DIDerivedType(tag: DW_TAG_pointer_type, 
baseType: null, size: 64)
 
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", scope: 
[[LEFT:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
+// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable", scope: 
[[LEFT:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
 
 // CHECK: [[LEFT]] = distinct !DICompositeType(tag: DW_TAG_structure_type, 
name: "CLeft"
 
 // CHECK: [[BASE:![0-9]*]] = distinct !DICompositeType(tag: 
DW_TAG_structure_type, name: "CBase"
 
 // CHECK: [[RIGHT_VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[RIGHT_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[RIGHT_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTVN5NSP_26CRightE"
+// CHECK-NEXT: [[RIGHT_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable", linkageName: "_ZTVN5NSP_26CRightE"
 
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", scope: 
[[RIGHT:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
+// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable", scope: 
[[RIGHT:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
 
 // CHECK: [[RIGHT]] = distinct !DICompositeType(tag: DW_TAG_structure_type, 
name: "CRight"
 
 // CHECK: [[DERIVED_VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[DERIVED_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[DERIVED_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTV8CDerived"
+// CHECK-NEXT: [[DERIVED_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable", linkageName: "_ZTV8CDerived"
 
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", scope: 
[[DERIVED:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
+// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable", scope: 
[[DERIVED:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
 
 // CHECK: [[DERIVED]] = distinct !DICompositeType(tag: DW_TAG_structure_type, 
name: "CDerived"
 
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", scope: 
[[BASE]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
+// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable", scope: 
[[BASE]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
diff --git a/clang/test/DebugInfo/CXX/vtable-inheritance-multiple.cpp 
b/clang/test/DebugInfo/CXX/vtable-inheritance-multiple.cpp
index 7079f06a8fbbd..2c6f708bd1034 100644
--- a/clang/test/DebugInfo/CXX/vtable-inheritance-multiple.cpp
+++ b/clang/test/DebugInfo/CXX/vtable-inheritance-multiple.cpp
@@ -1,7 +1,7 @@
 // Multiple inheritance case:
 // For CBaseOne, CBaseTwo and CDerived we check:
 // - Generation of their vtables (including attributes).
-// - Generation of their '__clang_vtable$' data members:
+// - Generation of their '__clang_vtable' data members:
 //   * Correct scope and attributes
 
 namespace NSP_1 {
@@ -50,24 +50,24 @@ int main() {
 // CHECK: @_ZTV8CDerived = linkonce_odr {{.*}}unnamed_addr constant {{.*}}, 
comdat, align 8, !dbg [[DERIVED_VTABLE_VAR:![0-9]*]]
 
 // CHECK: [[BASE_ONE_VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[BASE_ONE_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[BASE_ONE_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTVN5NSP_18CBaseOneE"
+// CHECK-NEXT: [[BASE_ONE_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable", linkageName: "_ZTVN5NSP_18CBaseOneE"
 
 // CHECK: [[BASE_TWO_VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[BASE_TWO_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[BASE_TWO_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTVN5NSP_28CBaseTwoE"
+// CHECK-NEXT: [[BASE_TWO_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable", linkageName: "_ZTVN5NSP_28CBaseTwoE"
 
 // CHECK: [[TYPE:![0-9]*]] = !DIDerivedType(tag: DW_TAG_pointer_type, 
baseType: null, size: 64)
 
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", scope: 
[[BASE_TWO:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
+// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable", scope: 
[[BASE_TWO:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
 
 // check: [[BASE_TWO]] = distinct !DICompositeType(tag: DW_TAG_structure_type, 
name: "CBaseTwo"
 
 // CHECK: [[DERIVED_VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[DERIVED_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK: [[DERIVED_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTV8CDerived"
+// CHECK: [[DERIVED_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable", linkageName: "_ZTV8CDerived"
 
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", scope: 
[[DERIVED:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
+// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable", scope: 
[[DERIVED:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
 
 // CHECK: [[DERIVED]] = distinct !DICompositeType(tag: DW_TAG_structure_type, 
name: "CDerived"
 
 // CHECK: [[BASE_ONE:![0-9]*]] = distinct !DICompositeType(tag: 
DW_TAG_structure_type, name: "CBaseOne"
 
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", scope: 
[[BASE_ONE]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
+// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable", scope: 
[[BASE_ONE]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
diff --git a/clang/test/DebugInfo/CXX/vtable-inheritance-simple-main.cpp 
b/clang/test/DebugInfo/CXX/vtable-inheritance-simple-main.cpp
index d23a9bcbf115b..6b4b869ff3a40 100644
--- a/clang/test/DebugInfo/CXX/vtable-inheritance-simple-main.cpp
+++ b/clang/test/DebugInfo/CXX/vtable-inheritance-simple-main.cpp
@@ -1,7 +1,7 @@
 // Simple inheritance case:
 // For CBase and CDerived we check:
 // - Generation of their vtables (including attributes).
-// - Generation of their '__clang_vtable$' data members:
+// - Generation of their '__clang_vtable' data members:
 //   * Correct scope and attributes
 
 #ifdef BASE_CODE
@@ -139,17 +139,17 @@ int main() {
 // CHECK-ONE: @_ZTVN3NSP5CBaseE = {{.*}}unnamed_addr constant {{.*}}, align 8, 
!dbg [[BASE_VTABLE_VAR:![0-9]*]]
 
 // CHECK-ONE: [[DERIVED_VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[DERIVED_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-ONE-NEXT: [[DERIVED_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTV8CDerived"
+// CHECK-ONE-NEXT: [[DERIVED_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable", linkageName: "_ZTV8CDerived"
 
 // CHECK-ONE: [[TYPE:![0-9]*]] = !DIDerivedType(tag: DW_TAG_pointer_type, 
baseType: null, size: 64)
 
-// CHECK-ONE: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", 
scope: [[DERIVED:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: 
DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
+// CHECK-ONE: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable", 
scope: [[DERIVED:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: 
DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
 // CHECK-ONE: [[DERIVED]] = distinct !DICompositeType(tag: 
DW_TAG_structure_type, name: "CDerived"
 
 // CHECK-ONE: [[BASE_VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[BASE_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-ONE-NEXT: [[BASE_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTVN3NSP5CBaseE"
+// CHECK-ONE-NEXT: [[BASE_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable", linkageName: "_ZTVN3NSP5CBaseE"
 
-// CHECK-ONE: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", 
scope: [[BASE:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate 
| DIFlagArtificial | DIFlagStaticMember)
+// CHECK-ONE: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable", 
scope: [[BASE:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate 
| DIFlagArtificial | DIFlagStaticMember)
 // CHECK-ONE: [[BASE]] = distinct !DICompositeType(tag: DW_TAG_structure_type, 
name: "CBase"
 
 // CHECK-TWO: ${{_ZN3NSP5CBaseC2Ev|_ZN8CDerivedC2Ev}} = comdat any
@@ -159,16 +159,16 @@ int main() {
 // CHECK-TWO: @_ZTV8CDerived = {{.*}}unnamed_addr constant {{.*}}, align 8, 
!dbg [[DERIVED_VTABLE_VAR:![0-9]*]]
 
 // CHECK-TWO: [[BASE_VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[BASE_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-TWO-NEXT: [[BASE_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTVN3NSP5CBaseE"
+// CHECK-TWO-NEXT: [[BASE_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable", linkageName: "_ZTVN3NSP5CBaseE"
 
 // CHECK-TWO: [[TYPE:![0-9]*]] = !DIDerivedType(tag: DW_TAG_pointer_type, 
baseType: null, size: 64)
 
-// CHECK-TWO: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", 
scope: [[BASE:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate 
| DIFlagArtificial | DIFlagStaticMember)
+// CHECK-TWO: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable", 
scope: [[BASE:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate 
| DIFlagArtificial | DIFlagStaticMember)
 // CHECK-TWO: [[BASE]] = distinct !DICompositeType(tag: DW_TAG_structure_type, 
name: "CBase"
 
 // CHECK-TWO: [[DERIVED_VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[DERIVED_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-TWO-NEXT: [[DERIVED_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTV8CDerived"
+// CHECK-TWO-NEXT: [[DERIVED_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable", linkageName: "_ZTV8CDerived"
 
-// CHECK-TWO: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", 
scope: [[DERIVED:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: 
DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
+// CHECK-TWO: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable", 
scope: [[DERIVED:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: 
DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
 
 // CHECK-TWO: [[DERIVED]] = distinct !DICompositeType(tag: 
DW_TAG_structure_type, name: "CDerived"
diff --git a/clang/test/DebugInfo/CXX/vtable-inheritance-simple.cpp 
b/clang/test/DebugInfo/CXX/vtable-inheritance-simple.cpp
index fd1458c5b1fa3..8ac3faf28f433 100644
--- a/clang/test/DebugInfo/CXX/vtable-inheritance-simple.cpp
+++ b/clang/test/DebugInfo/CXX/vtable-inheritance-simple.cpp
@@ -1,7 +1,7 @@
 // Simple inheritance case:
 // For CBase and CDerived we check:
 // - Generation of their vtables (including attributes).
-// - Generation of their '__clang_vtable$' data members:
+// - Generation of their '__clang_vtable' data members:
 //   * Correct scope and attributes
 
 namespace NSP {
@@ -40,17 +40,17 @@ int main() {
 // CHECK: @_ZTV8CDerived = linkonce_odr {{.*}}unnamed_addr constant {{.*}}, 
comdat, align 8, !dbg [[DERIVED_VTABLE_VAR:![0-9]*]]
 
 // CHECK: [[BASE_VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[BASE_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[BASE_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTVN3NSP5CBaseE"
+// CHECK-NEXT: [[BASE_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable", linkageName: "_ZTVN3NSP5CBaseE"
 
 // CHECK: [[DERIVED_VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[DERIVED_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[DERIVED_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTV8CDerived"
+// CHECK-NEXT: [[DERIVED_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable", linkageName: "_ZTV8CDerived"
 
 // CHECK: [[TYPE:![0-9]*]] = !DIDerivedType(tag: DW_TAG_pointer_type, 
baseType: null, size: 64)
 
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", scope: 
[[DERIVED:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
+// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable", scope: 
[[DERIVED:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
 
 // CHECK: [[DERIVED]] = distinct !DICompositeType(tag: DW_TAG_structure_type, 
name: "CDerived"
 
 // CHECK: [[BASE:![0-9]*]] = distinct !DICompositeType(tag: 
DW_TAG_structure_type, name: "CBase"
 
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", scope: 
[[BASE]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
+// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable", scope: 
[[BASE]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
diff --git a/clang/test/DebugInfo/CXX/vtable-inheritance-virtual.cpp 
b/clang/test/DebugInfo/CXX/vtable-inheritance-virtual.cpp
index 926eca9a48a4d..bca7da5a66a7c 100644
--- a/clang/test/DebugInfo/CXX/vtable-inheritance-virtual.cpp
+++ b/clang/test/DebugInfo/CXX/vtable-inheritance-virtual.cpp
@@ -1,7 +1,7 @@
 // Virtual inheritance case:
 // For CBase, CLeft, CRight and CDerived we check:
 // - Generation of their vtables (including attributes).
-// - Generation of their '__clang_vtable$' data members:
+// - Generation of their '__clang_vtable' data members:
 //   * Correct scope and attributes
 
 namespace NSP {
@@ -58,31 +58,31 @@ int main() {
 // CHECK: @_ZTV8CDerived = linkonce_odr {{.*}}unnamed_addr constant {{.*}}, 
comdat, align 8, !dbg [[DERIVED_VTABLE_VAR:![0-9]*]]
 
 // CHECK: [[BASE_VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[BASE_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[BASE_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTVN3NSP5CBaseE"
+// CHECK-NEXT: [[BASE_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable", linkageName: "_ZTVN3NSP5CBaseE"
 
 // CHECK: [[LEFT_VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[LEFT_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[LEFT_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTVN5NSP_15CLeftE"
+// CHECK-NEXT: [[LEFT_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable", linkageName: "_ZTVN5NSP_15CLeftE"
 
 // CHECK: [[TYPE:![0-9]*]] = !DIDerivedType(tag: DW_TAG_pointer_type, 
baseType: null, size: 64)
 
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", scope: 
[[LEFT:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
+// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable", scope: 
[[LEFT:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
 
 // CHECK: [[LEFT]] = distinct !DICompositeType(tag: DW_TAG_structure_type, 
name: "CLeft"
 
 // CHECK: [[BASE:![0-9]*]] = distinct !DICompositeType(tag: 
DW_TAG_structure_type, name: "CBase"
 
 // CHECK: [[RIGHT_VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[RIGHT_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[RIGHT_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTVN5NSP_26CRightE"
+// CHECK-NEXT: [[RIGHT_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable", linkageName: "_ZTVN5NSP_26CRightE"
 
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", scope: 
[[RIGHT:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
+// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable", scope: 
[[RIGHT:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
 
 // CHECK: [[RIGHT]] = distinct !DICompositeType(tag: DW_TAG_structure_type, 
name: "CRight"
 
 // CHECK: [[DERIVED_VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[DERIVED_VTABLE:![0-9]*]], expr: !DIExpression())
-// CHECK-NEXT: [[DERIVED_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTV8CDerived"
+// CHECK-NEXT: [[DERIVED_VTABLE]] = distinct !DIGlobalVariable(name: 
"__clang_vtable", linkageName: "_ZTV8CDerived"
 
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", scope: 
[[DERIVED:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
+// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable", scope: 
[[DERIVED:![0-9]*]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
 
 // CHECK: [[DERIVED]] = distinct !DICompositeType(tag: DW_TAG_structure_type, 
name: "CDerived"
 
-// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", scope: 
[[BASE]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
+// CHECK: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable", scope: 
[[BASE]], file: {{.*}}, baseType: [[TYPE]], flags: DIFlagPrivate | 
DIFlagArtificial | DIFlagStaticMember)
diff --git a/clang/test/DebugInfo/CXX/vtable-template-instantiation.cpp 
b/clang/test/DebugInfo/CXX/vtable-template-instantiation.cpp
index 966373017b526..700d0198a7888 100644
--- a/clang/test/DebugInfo/CXX/vtable-template-instantiation.cpp
+++ b/clang/test/DebugInfo/CXX/vtable-template-instantiation.cpp
@@ -2,17 +2,17 @@
 // - Implicitly instantiated whole class by up-casting (`NOCAST` not defined)
 //   or implicitly instantiated member functions only (`NOCAST` defined):
 //   * The vtable is generated with a COMDAT specifier
-//   * Its '__clang_vtable$' is generated
+//   * Its '__clang_vtable' is generated
 // - Define explicitly instantiation (`EXPLICIT` defined):
 //   * The vtable is generated with a COMDAT specifier
-//   * Its '__clang_vtable$' is generated
+//   * Its '__clang_vtable' is generated
 // - Declare explicitly instantiation as `extern` (`EXTERN` defined):
 //  # when non-optimized:
 //   * The vtable is declared
-//   * Its '__clang_vtable$' is NOT generated
+//   * Its '__clang_vtable' is NOT generated
 //  # when optimized even if no LLVM passes
 //   * The vtable is declared as `available_externally` (which is potentially 
turned into `external` by LLVM passes)
-//   * Its '__clang_vtable$' is generated only if the compiler is targeting 
the non-COFF platforms
+//   * Its '__clang_vtable' is generated only if the compiler is targeting the 
non-COFF platforms
 
 struct CBase {
   virtual void f() noexcept {}
@@ -68,18 +68,18 @@ int main() {
 
 // IMPLICIT: $_ZTV9CTemplateIvE = comdat any
 // IMPLICIT: @_ZTV9CTemplateIvE = linkonce_odr {{.*}}unnamed_addr constant {{{ 
\[[^]]*\] } { \[[^]]*\] \[[^]]*\] }}}, comdat, align 8, !dbg 
[[VTABLE_VAR:![0-9]*]]
-// IMPLICIT-DAG: [[VTABLE:![0-9]+]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTV9CTemplateIvE"
+// IMPLICIT-DAG: [[VTABLE:![0-9]+]] = distinct !DIGlobalVariable(name: 
"__clang_vtable", linkageName: "_ZTV9CTemplateIvE"
 // IMPLICIT-DAG: !DIGlobalVariableExpression(var: [[VTABLE]], expr: 
!DIExpression())
 // IMPLICIT-DAG: [[TYPE:![0-9]+]] = distinct !DICompositeType(tag: 
DW_TAG_structure_type, name: "CTemplate<void>"
-// IMPLICIT-DAG: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", 
scope: [[TYPE]], file: {{.*}}, baseType: [[PVOID:![0-9]+]], flags: 
DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
+// IMPLICIT-DAG: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable", 
scope: [[TYPE]], file: {{.*}}, baseType: [[PVOID:![0-9]+]], flags: 
DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
 // IMPLICIT-DAG: [[PVOID]] = !DIDerivedType(tag: DW_TAG_pointer_type, 
baseType: null, size: 64)
 
 // EXPLICIT: $_ZTV9CTemplateIvE = comdat any
 // EXPLICIT: @_ZTV9CTemplateIvE = weak_odr {{.*}}unnamed_addr constant {{{ 
\[[^]]*\] } { \[[^]]*\] \[[^]]*\] }}}, comdat, align 8, !dbg 
[[VTABLE_VAR:![0-9]*]]
-// EXPLICIT-DAG: [[VTABLE:![0-9]+]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTV9CTemplateIvE"
+// EXPLICIT-DAG: [[VTABLE:![0-9]+]] = distinct !DIGlobalVariable(name: 
"__clang_vtable", linkageName: "_ZTV9CTemplateIvE"
 // EXPLICIT-DAG: [[VTABLE_VAR]] = !DIGlobalVariableExpression(var: [[VTABLE]], 
expr: !DIExpression())
 // EXPLICIT-DAG: [[TYPE:![0-9]+]] = distinct !DICompositeType(tag: 
DW_TAG_structure_type, name: "CTemplate<void>"
-// EXPLICIT-DAG: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable$", 
scope: [[TYPE]], file: {{.*}}, baseType: [[PVOID:![0-9]+]], flags: 
DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
+// EXPLICIT-DAG: !DIDerivedType(tag: DW_TAG_variable, name: "__clang_vtable", 
scope: [[TYPE]], file: {{.*}}, baseType: [[PVOID:![0-9]+]], flags: 
DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
 // EXPLICIT-DAG: [[PVOID]] = !DIDerivedType(tag: DW_TAG_pointer_type, 
baseType: null, size: 64)
 
 // EXTERN-NOT: $_ZTV9CTemplateIvE
@@ -88,10 +88,10 @@ int main() {
 // EXTERN-O1-NODBG: @_ZTV9CTemplateIvE = available_externally 
{{.*}}unnamed_addr constant {{{ \[[^]]*\] } { \[[^]]*\] \[[^]]*\] }}}, align 
8{{$}}
 // EXTERN-NODBG-DAG: [[TYPE:![0-9]+]] = !DICompositeType(tag: 
DW_TAG_structure_type, name: "CTemplate<void>"
 // EXTERN-NODBG-DAG: !DICompileUnit
-// EXTERN-NODBG-NOT: !DIGlobalVariable(name: "__clang_vtable$", linkageName: 
"_ZTV9CTemplateIvE"
-// EXTERN-NODBG-NOT: !DIDerivedType(tag: DW_TAG_variable, name: 
"__clang_vtable$", scope: [[TYPE]], file: {{.*}}, baseType: [[PVOID:![0-9]+]], 
flags: DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
-// EXTERN-DBG-DAG: [[VTABLE:![0-9]+]] = distinct !DIGlobalVariable(name: 
"__clang_vtable$", linkageName: "_ZTV9CTemplateIvE"
+// EXTERN-NODBG-NOT: !DIGlobalVariable(name: "__clang_vtable", linkageName: 
"_ZTV9CTemplateIvE"
+// EXTERN-NODBG-NOT: !DIDerivedType(tag: DW_TAG_variable, name: 
"__clang_vtable", scope: [[TYPE]], file: {{.*}}, baseType: [[PVOID:![0-9]+]], 
flags: DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
+// EXTERN-DBG-DAG: [[VTABLE:![0-9]+]] = distinct !DIGlobalVariable(name: 
"__clang_vtable", linkageName: "_ZTV9CTemplateIvE"
 // EXTERN-DBG-DAG: [[VTABLE_VAR]] = !DIGlobalVariableExpression(var: 
[[VTABLE]], expr: !DIExpression())
 // EXTERN-DBG-DAG: [[TYPE:![0-9]+]] = !DICompositeType(tag: 
DW_TAG_structure_type, name: "CTemplate<void>"
-// EXTERN-DBG-DAG: !DIDerivedType(tag: DW_TAG_variable, name: 
"__clang_vtable$", scope: [[TYPE]], file: {{.*}}, baseType: [[PVOID:![0-9]+]], 
flags: DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
+// EXTERN-DBG-DAG: !DIDerivedType(tag: DW_TAG_variable, name: 
"__clang_vtable", scope: [[TYPE]], file: {{.*}}, baseType: [[PVOID:![0-9]+]], 
flags: DIFlagPrivate | DIFlagArtificial | DIFlagStaticMember)
 // EXTERN-DBG-DAG: [[PVOID]] = !DIDerivedType(tag: DW_TAG_pointer_type, 
baseType: null, size: 64)

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to