Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -emit-llvm %s -o %t |
Douglas Gregor | d7f37bf | 2009-06-22 23:06:13 +0000 | [diff] [blame] | 2 | |
| 3 | template<typename T> |
| 4 | struct X { |
| 5 | void f(T) { } |
| 6 | void f(char) { } |
| 7 | |
| 8 | void g(T) { } |
| 9 | |
| 10 | void h(T) { } |
| 11 | }; |
| 12 | |
| 13 | void foo(X<int> &xi, X<float> *xfp, int i, float f) { |
Daniel Dunbar | 4fcfde4 | 2009-11-08 01:45:36 +0000 | [diff] [blame] | 14 | // RUN: grep "linkonce_odr.*_ZN1XIiE1fEi" %t | count 1 |
Douglas Gregor | d7f37bf | 2009-06-22 23:06:13 +0000 | [diff] [blame] | 15 | xi.f(i); |
| 16 | |
Daniel Dunbar | 4fcfde4 | 2009-11-08 01:45:36 +0000 | [diff] [blame] | 17 | // RUN: grep "linkonce_odr.*_ZN1XIiE1gEi" %t | count 1 |
Douglas Gregor | d7f37bf | 2009-06-22 23:06:13 +0000 | [diff] [blame] | 18 | xi.g(f); |
| 19 | |
Daniel Dunbar | 4fcfde4 | 2009-11-08 01:45:36 +0000 | [diff] [blame] | 20 | // RUN: grep "linkonce_odr.*_ZN1XIfE1fEf" %t | count 1 |
Douglas Gregor | d7f37bf | 2009-06-22 23:06:13 +0000 | [diff] [blame] | 21 | xfp->f(f); |
| 22 | |
Daniel Dunbar | 4fcfde4 | 2009-11-08 01:45:36 +0000 | [diff] [blame] | 23 | // RUN: grep "linkonce_odr.*_ZN1XIfE1hEf" %t | count 0 |
Douglas Gregor | d7f37bf | 2009-06-22 23:06:13 +0000 | [diff] [blame] | 24 | |
Douglas Gregor | d7f37bf | 2009-06-22 23:06:13 +0000 | [diff] [blame] | 25 | } |
| 26 | |
| 27 | |
| 28 | |