llvm-6502/test/FrontendC++/ptr-to-method-devirt.cpp
Duncan Sands 5a079eb6ab Due to changes coming from the new LLVM type system, you now get
bitcasts in this test rather than getelementptr instructions;
llvm-gcc produces two bitcasts, clang produces one.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136349 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 12:21:47 +00:00

16 lines
281 B
C++

// PR1602
// RUN: %llvmgxx -S %s -o - -O3 | not grep ptrtoint
// RUN: %llvmgxx -S %s -o - -O3 | not grep getelementptr
// RUN: %llvmgxx -S %s -o - -O3 | grep bitcast
struct S { virtual void f(); };
typedef void (S::*P)(void);
const P p = &S::f;
void g(S s) {
(s.*p)();
}