r206974 - Add yet another vtordisp test
Timur Iskhodzhanov
timurrrr at google.com
Wed Apr 23 05:46:27 PDT 2014
Author: timurrrr
Date: Wed Apr 23 07:46:26 2014
New Revision: 206974
URL: http://llvm.org/viewvc/llvm-project?rev=206974&view=rev
Log:
Add yet another vtordisp test
Modified:
cfe/trunk/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance-vtordisps.cpp
Modified: cfe/trunk/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance-vtordisps.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance-vtordisps.cpp?rev=206974&r1=206973&r2=206974&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance-vtordisps.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance-vtordisps.cpp Wed Apr 23 07:46:26 2014
@@ -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 at pr19519@@6B@" = {{.*}}@"\01?g at C@pr19519@@$4PPPPPPPM at 3AEXXZ"
+};
+
+X::X() {}
+}
More information about the cfe-commits
mailing list