Fix linkage of type info and vtable for classes without linkage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91152 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenCXX/vtable-linkage.cpp b/test/CodeGenCXX/vtable-linkage.cpp
index 5bc509b..f2d914f 100644
--- a/test/CodeGenCXX/vtable-linkage.cpp
+++ b/test/CodeGenCXX/vtable-linkage.cpp
@@ -28,6 +28,8 @@
void D::f() { }
+static struct : D { } e;
+
// B has a key function that is not defined in this translation unit so its vtable
// has external linkage.
// CHECK: @_ZTV1B = external constant
@@ -43,6 +45,12 @@
// CHECK: @_ZTI1D = constant
// CHECK: @_ZTV1D = constant
+// The anonymous struct for e has no linkage, so the vtable should have
+// internal linkage.
+// CHECK: @"_ZTS3$_0" = internal constant
+// CHECK: @"_ZTI3$_0" = internal constant
+// CHECK: @"_ZTV3$_0" = internal constant
+
// The A vtable should have internal linkage since it is inside an anonymous
// namespace.
// CHECK: @_ZTSN12_GLOBAL__N_11AE = internal constant