blob: 46e73b4016978bf89dd28584017b97864ab1d988 [file] [log] [blame]
Xinliang David Lib4fc4cb2016-01-21 02:35:59 +00001template <class T> class FOO {
2public:
3 FOO() : t(0) {}
4
5 T DoIt(T ti);
6
7private:
8 T t;
9};
10
11template <class T> T FOO<T>::DoIt(T ti) { // HEADER: 2| [[@LINE]]|template
12 for (T I = 0; I < ti; I++) { // HEADER: 22| [[@LINE]]| for (T
13 t += I; // HEADER: 20| [[@LINE]]| t += I;
14 if (I > ti / 2) // HEADER: 20| [[@LINE]]| if (I > ti
15 t -= 1; // HEADER: 8| [[@LINE]]| t -= 1;
Vedant Kumar86705ba2016-03-28 21:06:42 +000016 } // HEADER: {{.*}}| [[@LINE]]| }
17 // HEADER: {{.*}}| [[@LINE]]|
18 return t; // HEADER: {{.*}}| [[@LINE]]| return t;
Xinliang David Lib4fc4cb2016-01-21 02:35:59 +000019}
Vedant Kumar86705ba2016-03-28 21:06:42 +000020
21// FIXME: Some check lines in this function were temporarily weakened to
22// simplify a bugfix.
23
24// To generate the binaries which correspond to this file, you must first
25// compile a program with two calls to Foo<int>::DoIt(10) for each desired
26// architecture. Collect a raw profile from any one of these binaries, index
27// it, and check it in along with the executables.