summaryrefslogtreecommitdiff
path: root/test/profile/Inputs/extern_template.h
blob: 01c1d1abfff5431b137d6ca952e86721193ac226 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
template <typename T> struct Test {
  Test() : M(10) {}
  void doIt(int N) { // CHECK: 2| [[@LINE]]|  void doIt
    if (N > 10) {    // CHECK: 2| [[@LINE]]|    if (N > 10) {
      M += 2;        // CHECK: 1| [[@LINE]]|      M += 2;
    } else           // CHECK: 1| [[@LINE]]|    } else
      M -= 2;        // CHECK: 1| [[@LINE]]|      M -= 2;
  }
  T M;
};

#ifdef USE
extern template struct Test<int>;
#endif
#ifdef DEF
template struct Test<int>;
#endif