diff options
author | Timur Iskhodzhanov <timurrrr@google.com> | 2013-09-27 14:48:01 +0000 |
---|---|---|
committer | Timur Iskhodzhanov <timurrrr@google.com> | 2013-09-27 14:48:01 +0000 |
commit | a53d7a0259ff88f78ba8ecac7d0cb3ea96302b1d (patch) | |
tree | d1ca7b5de2827159f71b9d351ae2048cea182345 /test/CodeGenCXX/microsoft-abi-virtual-inheritance.cpp | |
parent | acf8e90b22cfea07ba2edeaa5101160eda8dc82c (diff) |
Abstract out the emission of vtables, add basic support for vtable emission when using -cxx-abi microsoft
Reviewed at http://llvm-reviews.chandlerc.com/D1532
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191523 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/microsoft-abi-virtual-inheritance.cpp')
-rw-r--r-- | test/CodeGenCXX/microsoft-abi-virtual-inheritance.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGenCXX/microsoft-abi-virtual-inheritance.cpp b/test/CodeGenCXX/microsoft-abi-virtual-inheritance.cpp index ecbb843379..064a3ffda9 100644 --- a/test/CodeGenCXX/microsoft-abi-virtual-inheritance.cpp +++ b/test/CodeGenCXX/microsoft-abi-virtual-inheritance.cpp @@ -7,10 +7,26 @@ struct VBase { }; struct B : virtual VBase { + B(); virtual void foo(); virtual void bar(); }; +B::B() { + // CHECK: @"\01??0B@@QAE@XZ" + // CHECK: %[[THIS:.*]] = load %struct.B** + // CHECK: br i1 %{{.*}}, label %[[INIT_VBASES:.*]], label %[[SKIP_VBASES:.*]] + // CHECK: %[[SKIP_VBASES]] + // CHECK: %[[THIS_i8:.*]] = bitcast %struct.B* %[[THIS]] to i8* + // CHECK: %[[VBPTR:.*]] = getelementptr inbounds i8* %[[THIS_i8]], i32 0 + // CHECK: %[[THIS_i8:.*]] = bitcast %struct.B* %[[THIS]] to i8* + // CHECK: %[[VFPTR_i8:.*]] = getelementptr inbounds i8* %[[THIS_i8]], i32 %{{.*}} + // CHECK: %[[VFPTR:.*]] = bitcast i8* %[[VFPTR_i8]] to [2 x i8*]** + // CHECK: store [2 x i8*]* @"\01??_7B@@6B@", [2 x i8*]** %[[VFPTR]] + // FIXME: Should initialize the vtorDisp here. + // CHECK: ret +} + void B::foo() { // CHECK: define x86_thiscallcc void @"\01?foo@B@@UAEXXZ"(i8* // |