blob: c3c49c3218b32fe0aa4bb6c29dadbfc01e9d02a3 [file] [log] [blame]
Hans Wennborgc9bd88e2014-01-14 19:35:09 +00001// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple %s -o %t
Douglas Gregor77b50e12009-06-22 23:06:13 +00002
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) {
Daniel Dunbar8b576972009-11-08 01:45:36 +000014 // RUN: grep "linkonce_odr.*_ZN1XIiE1fEi" %t | count 1
Douglas Gregor77b50e12009-06-22 23:06:13 +000015 xi.f(i);
16
Daniel Dunbar8b576972009-11-08 01:45:36 +000017 // RUN: grep "linkonce_odr.*_ZN1XIiE1gEi" %t | count 1
Douglas Gregor77b50e12009-06-22 23:06:13 +000018 xi.g(f);
19
Daniel Dunbar8b576972009-11-08 01:45:36 +000020 // RUN: grep "linkonce_odr.*_ZN1XIfE1fEf" %t | count 1
Douglas Gregor77b50e12009-06-22 23:06:13 +000021 xfp->f(f);
22
Rafael Espindolabe8a91b2013-07-04 15:22:16 +000023 // RUN: not grep "linkonce_odr.*_ZN1XIfE1hEf" %t
Douglas Gregor77b50e12009-06-22 23:06:13 +000024
Douglas Gregor77b50e12009-06-22 23:06:13 +000025}
26
27
28