summaryrefslogtreecommitdiff
path: root/test/profile/Inputs/extern_template.h
diff options
context:
space:
mode:
Diffstat (limited to 'test/profile/Inputs/extern_template.h')
-rw-r--r--test/profile/Inputs/extern_template.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/profile/Inputs/extern_template.h b/test/profile/Inputs/extern_template.h
new file mode 100644
index 0000000000000..01c1d1abfff54
--- /dev/null
+++ b/test/profile/Inputs/extern_template.h
@@ -0,0 +1,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