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 | 8b5987eba5a080962cbc98ce5f006db3aa62ae2e (patch) | |
tree | e0986fcd7045e6a7713a09ebe39936cec8263dde /clang/test/CodeGenCXX/microsoft-abi-multiple-nonvirtual-inheritance.cpp | |
parent | f56ddf7fd1ea405e29b603f5afd54b736d8031f3 (diff) | |
download | bcm5719-llvm-8b5987eba5a080962cbc98ce5f006db3aa62ae2e.tar.gz bcm5719-llvm-8b5987eba5a080962cbc98ce5f006db3aa62ae2e.zip |
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
llvm-svn: 191523
Diffstat (limited to 'clang/test/CodeGenCXX/microsoft-abi-multiple-nonvirtual-inheritance.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/microsoft-abi-multiple-nonvirtual-inheritance.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/microsoft-abi-multiple-nonvirtual-inheritance.cpp b/clang/test/CodeGenCXX/microsoft-abi-multiple-nonvirtual-inheritance.cpp index 9059e6f028b..fc59e1751fd 100644 --- a/clang/test/CodeGenCXX/microsoft-abi-multiple-nonvirtual-inheritance.cpp +++ b/clang/test/CodeGenCXX/microsoft-abi-multiple-nonvirtual-inheritance.cpp @@ -145,3 +145,39 @@ void call_grandchild_right(GrandchildOverride *obj) { // Just make sure we don't crash. obj->right(); } + +void emit_ctors() { + Left l; + // CHECK: define {{.*}} @"\01??0Left@@QAE@XZ" + // CHECK-NOT: getelementptr + // CHECK: store [1 x i8*]* @"\01??_7Left@@6B@" + // CHECK: ret + + Right r; + // CHECK: define {{.*}} @"\01??0Right@@QAE@XZ" + // CHECK-NOT: getelementptr + // CHECK: store [1 x i8*]* @"\01??_7Right@@6B@" + // CHECK: ret + + ChildOverride co; + // CHECK: define {{.*}} @"\01??0ChildOverride@@QAE@XZ" + // CHECK: %[[THIS:.*]] = load %struct.ChildOverride** + // CHECK: %[[VFPTR:.*]] = bitcast %struct.ChildOverride* %this1 to [1 x i8*]** + // CHECK: store [1 x i8*]* @"\01??_7ChildOverride@@6BLeft@@@", [1 x i8*]** %[[VFPTR]] + // CHECK: %[[THIS_i8:.*]] = bitcast %struct.ChildOverride* %[[THIS]] to i8* + // CHECK: %[[VFPTR_i8:.*]] = getelementptr inbounds i8* %[[THIS_i8]], i32 4 + // CHECK: %[[VFPTR:.*]] = bitcast i8* %[[VFPTR_i8]] to [1 x i8*]** + // CHECK: store [1 x i8*]* @"\01??_7ChildOverride@@6BRight@@@", [1 x i8*]** %[[VFPTR]] + // CHECK: ret + + GrandchildOverride gc; + // CHECK: define {{.*}} @"\01??0GrandchildOverride@@QAE@XZ" + // CHECK: %[[THIS:.*]] = load %struct.GrandchildOverride** + // CHECK: %[[VFPTR:.*]] = bitcast %struct.GrandchildOverride* %this1 to [1 x i8*]** + // CHECK: store [1 x i8*]* @"\01??_7GrandchildOverride@@6BLeft@@@", [1 x i8*]** %[[VFPTR]] + // CHECK: %[[THIS_i8:.*]] = bitcast %struct.GrandchildOverride* %[[THIS]] to i8* + // CHECK: %[[VFPTR_i8:.*]] = getelementptr inbounds i8* %[[THIS_i8]], i32 4 + // CHECK: %[[VFPTR:.*]] = bitcast i8* %[[VFPTR_i8]] to [1 x i8*]** + // CHECK: store [1 x i8*]* @"\01??_7GrandchildOverride@@6BRight@@@", [1 x i8*]** %[[VFPTR]] + // CHECK: ret +} |