1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 %s -emit-llvm -triple i686-pc-linux -o - -chain-include %s -chain-include %s | FileCheck %s 2f4a2713aSLionel Sambuc // CHECK: define linkonce_odr %{{[^ ]+}} @_ZN1AI1BE3getEv 3f4a2713aSLionel Sambuc #if !defined(PASS1) 4f4a2713aSLionel Sambuc #define PASS1 5f4a2713aSLionel Sambuc 6f4a2713aSLionel Sambuc template <typename Derived> 7f4a2713aSLionel Sambuc struct A { getA8f4a2713aSLionel Sambuc Derived* get() { return 0; } 9f4a2713aSLionel Sambuc }; 10f4a2713aSLionel Sambuc 11f4a2713aSLionel Sambuc struct B : A<B> { 12f4a2713aSLionel Sambuc }; 13f4a2713aSLionel Sambuc 14f4a2713aSLionel Sambuc #elif !defined(PASS2) 15f4a2713aSLionel Sambuc #define PASS2 16f4a2713aSLionel Sambuc 17f4a2713aSLionel Sambuc struct C : B { 18f4a2713aSLionel Sambuc }; 19f4a2713aSLionel Sambuc 20f4a2713aSLionel Sambuc struct D : C { runD21f4a2713aSLionel Sambuc void run() { 22f4a2713aSLionel Sambuc (void)get(); 23f4a2713aSLionel Sambuc } 24f4a2713aSLionel Sambuc }; 25f4a2713aSLionel Sambuc 26f4a2713aSLionel Sambuc #else 27f4a2713aSLionel Sambuc main()28f4a2713aSLionel Sambucint main() { 29f4a2713aSLionel Sambuc D d; 30f4a2713aSLionel Sambuc d.run(); 31f4a2713aSLionel Sambuc } 32f4a2713aSLionel Sambuc 33f4a2713aSLionel Sambuc #endif 34