Baby steps towards fixing PR5589. If a class needs a vtable pointer, add one.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91545 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenCXX/class-layout.cpp b/test/CodeGenCXX/class-layout.cpp
index e1ff37f..31091c5 100644
--- a/test/CodeGenCXX/class-layout.cpp
+++ b/test/CodeGenCXX/class-layout.cpp
@@ -7,3 +7,7 @@
// No need to add tail padding here.
// CHECK: %struct.B = type { i8*, i32 }
struct B { void *a; int b; } b;
+
+// C should have a vtable pointer.
+// CHECK: %struct.C = type { i8**, i32 }
+struct C { virtual void f(); int a; } *c;
diff --git a/test/CodeGenCXX/virt.cpp b/test/CodeGenCXX/virt.cpp
index 0acd264..259fd03 100644
--- a/test/CodeGenCXX/virt.cpp
+++ b/test/CodeGenCXX/virt.cpp
@@ -147,12 +147,12 @@
}
// CHECK-LPLL64:define void @_Z10test12_foov() nounwind {
-// CHECK-LPLL64: call void %2(%class.test14* %tmp)
-// CHECK-LPLL64: call void %5(%class.test14* %tmp1)
-// CHECK-LPLL64: call void %8(%class.test14* %tmp3)
-// CHECK-LPLL64: call void %11(%class.test14* %tmp5)
-// CHECK-LPLL64: call void %14(%class.test14* %tmp7)
-// CHECK-LPLL64: call void %17(%class.test14* %tmp9)
+// CHECK-LPLL64: call void %
+// CHECK-LPLL64: call void %
+// CHECK-LPLL64: call void %
+// CHECK-LPLL64: call void %
+// CHECK-LPLL64: call void %
+// CHECK-LPLL64: call void %
// CHECK-LPLL64: call void @_ZN8test12_A3fooEv(%class.test14* %tmp11)