test that the ptr-to-method is succefully eliminated, leaving just the vtable dispatch.
llvm-svn: 41047
This commit is contained in:
parent
aadc778782
commit
3251377104
|
|
@ -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)();
|
||||
}
|
||||
Loading…
Reference in New Issue