]> granicus.if.org Git - clang/commitdiff
with recent optimizer changes, these all get devirtualized.
authorChris Lattner <sabre@nondot.org>
Sat, 1 May 2010 01:42:06 +0000 (01:42 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 1 May 2010 01:42:06 +0000 (01:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102825 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGenCXX/member-function-pointer-calls.cpp
test/CodeGenCXX/member-initializers.cpp

index e1f2eb78d414384dc5fc3fc39c04054f9282572b..6f0ef81fe35dcf6d951e1a78818014b0ee0e2d8e 100644 (file)
@@ -9,18 +9,17 @@ int f(A* a, int (A::*fp)()) {
 }
 
 // CHECK: define i32 @_Z2g1v()
+// CHECK-NEXT: {{.*}}:
+// CHECK-NEXT: ret i32 1
 int g1() {
   A a;
-  
-  // CHECK: call i32 @_ZN1A3vf1Ev
-  // CHECK-NEXT: ret i32
   return f(&a, &A::vf1);
 }
 
+// CHECK: define i32 @_Z2g2v()
+// CHECK-NEXT: {{.*}}:
+// CHECK-NEXT: ret i32 2
 int g2() {
   A a;
-  
-  // CHECK: call i32 @_ZN1A3vf2Ev
-  // CHECK-NEXT: ret i32
   return f(&a, &A::vf2);
 }
index 81dcee7e407a0658d6d2bb21e1f31307707c06b9..244a164b9fe2d8ddbd6f3070b89f1fa005017d43 100644 (file)
@@ -16,7 +16,7 @@ struct B : A {
 int f() {
   B b;
   
-  // CHECK: call i32 @_ZN1B1fEv
+  // CHECK: ret i32 2
   return b.i;
 }