summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-cov/Inputs/instrprof-comdat.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/tools/llvm-cov/Inputs/instrprof-comdat.h')
-rw-r--r--llvm/test/tools/llvm-cov/Inputs/instrprof-comdat.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-cov/Inputs/instrprof-comdat.h b/llvm/test/tools/llvm-cov/Inputs/instrprof-comdat.h
new file mode 100644
index 00000000000..e1227167cd4
--- /dev/null
+++ b/llvm/test/tools/llvm-cov/Inputs/instrprof-comdat.h
@@ -0,0 +1,19 @@
+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: 10| [[@LINE]]| }
+ // HEADER: 1| [[@LINE]]|
+ return t; // HEADER: 1| [[@LINE]]| return t;
+}
OpenPOWER on IntegriCloud