First step towards vftable generation with -cxx-abi microsoft PR13231
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173035 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenCXX/microsoft-abi-constructors.cpp b/test/CodeGenCXX/microsoft-abi-constructors.cpp
index 89731ff..c9701e8 100644
--- a/test/CodeGenCXX/microsoft-abi-constructors.cpp
+++ b/test/CodeGenCXX/microsoft-abi-constructors.cpp
@@ -22,3 +22,14 @@
// CHECK: ret
}
+struct B {
+ virtual ~B();
+ virtual void foo();
+};
+
+void check_vftable_offset() {
+ B b;
+// The vftable pointer should point at the beginning of the vftable.
+// CHECK: [[THIS_PTR:%[0-9]+]] = bitcast %struct.B* {{.*}} to i8***
+// CHECK: store i8** getelementptr inbounds ([2 x i8*]* @"\01??_7B@@6B@", i64 0, i64 0), i8*** [[THIS_PTR]]
+}