test that the ptr-to-method is succefully eliminated, leaving just the vtable dispatch.

llvm-svn: 41047
This commit is contained in:
Chris Lattner 2007-08-13 17:17:03 +00:00
parent 8674db5fbf
commit a41b2e2d2f

View File

@ -0,0 +1,14 @@
// PR1602
// RUN: %llvmgxx -c -emit-llvm %s -o - -O3 | llvm-dis | not grep ptrtoint
// RUN: %llvmgxx -c -emit-llvm %s -o - -O3 | llvm-dis | grep getelementptr | count 1
struct S { virtual void f(); };
typedef void (S::*P)(void);
const P p = &S::f;
void g(S s) {
(s.*p)();
}