1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -emit-llvm %s -o %t 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambuc template<typename T> 4*f4a2713aSLionel Sambuc struct X { 5*f4a2713aSLionel Sambuc void f(T) { } 6*f4a2713aSLionel Sambuc void f(char) { } 7*f4a2713aSLionel Sambuc 8*f4a2713aSLionel Sambuc void g(T) { } 9*f4a2713aSLionel Sambuc 10*f4a2713aSLionel Sambuc void h(T) { } 11*f4a2713aSLionel Sambuc }; 12*f4a2713aSLionel Sambuc 13*f4a2713aSLionel Sambuc void foo(X<int> &xi, X<float> *xfp, int i, float f) { 14*f4a2713aSLionel Sambuc // RUN: grep "linkonce_odr.*_ZN1XIiE1fEi" %t | count 1 15*f4a2713aSLionel Sambuc xi.f(i); 16*f4a2713aSLionel Sambuc 17*f4a2713aSLionel Sambuc // RUN: grep "linkonce_odr.*_ZN1XIiE1gEi" %t | count 1 18*f4a2713aSLionel Sambuc xi.g(f); 19*f4a2713aSLionel Sambuc 20*f4a2713aSLionel Sambuc // RUN: grep "linkonce_odr.*_ZN1XIfE1fEf" %t | count 1 21*f4a2713aSLionel Sambuc xfp->f(f); 22*f4a2713aSLionel Sambuc 23*f4a2713aSLionel Sambuc // RUN: not grep "linkonce_odr.*_ZN1XIfE1hEf" %t 24*f4a2713aSLionel Sambuc 25*f4a2713aSLionel Sambuc } 26*f4a2713aSLionel Sambuc 27*f4a2713aSLionel Sambuc 28*f4a2713aSLionel Sambuc 29