[cfe-commits] r124988 - /cfe/trunk/test/CodeGenCXX/vtable-available-externally.cpp
Anders Carlsson
andersca at mac.com
Sun Feb 6 12:16:20 PST 2011
Author: andersca
Date: Sun Feb 6 14:16:20 2011
New Revision: 124988
URL: http://llvm.org/viewvc/llvm-project?rev=124988&view=rev
Log:
Add another test that we can fully devirtualize now.
Modified:
cfe/trunk/test/CodeGenCXX/vtable-available-externally.cpp
Modified: cfe/trunk/test/CodeGenCXX/vtable-available-externally.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/vtable-available-externally.cpp?rev=124988&r1=124987&r2=124988&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/vtable-available-externally.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/vtable-available-externally.cpp Sun Feb 6 14:16:20 2011
@@ -2,6 +2,7 @@
// RUN: FileCheck --check-prefix=CHECK-TEST1 %s < %t
// RUN: FileCheck --check-prefix=CHECK-TEST2 %s < %t
// RUN: FileCheck --check-prefix=CHECK-TEST5 %s < %t
+// RUN: FileCheck --check-prefix=CHECK-TEST7 %s < %t
#include <typeinfo>
@@ -144,3 +145,27 @@
D::D() { }
}
+
+namespace Test7 {
+
+struct c1 {};
+struct c10 : c1{
+ virtual void foo ();
+};
+struct c11 : c10, c1{
+ virtual void f6 ();
+};
+struct c28 : virtual c11{
+ void f6 ();
+};
+
+// CHECK-TEST7: define void @_ZN5Test79check_c28Ev
+// CHECK-TEST7: call void @_ZN5Test73c282f6Ev
+// CHECK-TEST7: ret void
+void check_c28 () {
+ c28 obj;
+ c11 *ptr = &obj;
+ ptr->f6 ();
+}
+
+}
More information about the cfe-commits
mailing list