summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-cov/Inputs/instrprof-comdat.h
blob: 46e73b4016978bf89dd28584017b97864ab1d988 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
template <class T> class FOO {
public:
  FOO() : t(0) {}

  T DoIt(T ti);

private:
  T t;
};

template <class T> T FOO<T>::DoIt(T ti) { // HEADER:  2| [[@LINE]]|template
  for (T I = 0; I < ti; I++) {            // HEADER: 22| [[@LINE]]|  for (T
    t += I;                               // HEADER: 20| [[@LINE]]|    t += I;
    if (I > ti / 2)                       // HEADER: 20| [[@LINE]]|    if (I > ti 
      t -= 1;                             // HEADER:  8| [[@LINE]]|      t -= 1;
  }                                       // HEADER: {{.*}}| [[@LINE]]|  }
                                          // HEADER: {{.*}}| [[@LINE]]|
  return t;                               // HEADER: {{.*}}| [[@LINE]]|  return t;
}

// FIXME: Some check lines in this function were temporarily weakened to
// simplify a bugfix.

// To generate the binaries which correspond to this file, you must first
// compile a program with two calls to Foo<int>::DoIt(10) for each desired
// architecture. Collect a raw profile from any one of these binaries, index
// it, and check it in along with the executables.
OpenPOWER on IntegriCloud