diff options
author | Timur Iskhodzhanov <timurrrr@google.com> | 2014-04-23 12:46:26 +0000 |
---|---|---|
committer | Timur Iskhodzhanov <timurrrr@google.com> | 2014-04-23 12:46:26 +0000 |
commit | 9f23b203d3d10403788e9c232e9c5f3656a07b43 (patch) | |
tree | 2242b0270535dce4ce3dde106b7a540196f6bb1b | |
parent | e3e047e768e013c70f34d221c57012e5efe150c4 (diff) | |
download | bcm5719-llvm-9f23b203d3d10403788e9c232e9c5f3656a07b43.tar.gz bcm5719-llvm-9f23b203d3d10403788e9c232e9c5f3656a07b43.zip |
Add yet another vtordisp test
llvm-svn: 206974
-rw-r--r-- | clang/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance-vtordisps.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance-vtordisps.cpp b/clang/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance-vtordisps.cpp index 066c8912fd6..f63808a8987 100644 --- a/clang/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance-vtordisps.cpp +++ b/clang/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance-vtordisps.cpp @@ -535,3 +535,35 @@ struct X : C, virtual B { void build_vftable(X *obj) { obj->g(); } } + +namespace pr19519 { +// VS2013 CL miscompiles this, just make sure we don't regress. + +struct A { + virtual void f(); + virtual void g(); +}; + +struct B : virtual A { + virtual void f(); + B(); +}; + +struct C : virtual A { + virtual void g(); +}; + +struct X : B, C { + X(); + + // CHECK-LABEL: VFTable for 'pr19519::A' in 'pr19519::B' in 'pr19519::X' (2 entries). + // CHECK-NEXT: 0 | void pr19519::B::f() + // CHECK-NEXT: [this adjustment: vtordisp at -4, -4 non-virtual] + // CHECK-NEXT: 1 | void pr19519::C::g() + // CHECK-NEXT: [this adjustment: vtordisp at -4, -4 non-virtual] + + // MANGLING-DAG: @"\01??_7X@pr19519@@6B@" = {{.*}}@"\01?g@C@pr19519@@$4PPPPPPPM@3AEXXZ" +}; + +X::X() {} +} |