diff options
Diffstat (limited to 'clang/test/CodeGenCXX/microsoft-abi-constructors.cpp')
| -rw-r--r-- | clang/test/CodeGenCXX/microsoft-abi-constructors.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/microsoft-abi-constructors.cpp b/clang/test/CodeGenCXX/microsoft-abi-constructors.cpp index 89731ff38e9..c9701e8270d 100644 --- a/clang/test/CodeGenCXX/microsoft-abi-constructors.cpp +++ b/clang/test/CodeGenCXX/microsoft-abi-constructors.cpp @@ -22,3 +22,14 @@ void no_contstructor_destructor_infinite_recursion() { // 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]] +} |

