brintos

brintos / llvm-project-archived public Read only

0
0
Text · 505 B · c3c49c3 Raw
29 lines · cpp
1// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple %s -o %t2 3template<typename T>4struct X {5  void f(T) { }6  void f(char) { }7  8  void g(T) { }9  10  void h(T) { }11};12 13void foo(X<int> &xi, X<float> *xfp, int i, float f) {14  // RUN: grep "linkonce_odr.*_ZN1XIiE1fEi" %t | count 115  xi.f(i);16  17  // RUN: grep "linkonce_odr.*_ZN1XIiE1gEi" %t | count 118  xi.g(f);19  20  // RUN: grep "linkonce_odr.*_ZN1XIfE1fEf" %t | count 121  xfp->f(f);22  23  // RUN: not grep "linkonce_odr.*_ZN1XIfE1hEf" %t24  25}26 27 28 29