aboutsummaryrefslogtreecommitdiff
path: root/test/profile/Inputs
diff options
context:
space:
mode:
Diffstat (limited to 'test/profile/Inputs')
-rw-r--r--test/profile/Inputs/gcc-flag-compatibility.c8
-rw-r--r--test/profile/Inputs/instrprof-dynamic-a.cpp4
-rw-r--r--test/profile/Inputs/instrprof-dynamic-b.cpp4
-rw-r--r--test/profile/Inputs/instrprof-dynamic-header.h6
-rw-r--r--test/profile/Inputs/instrprof-dynamic-main.cpp2
5 files changed, 17 insertions, 7 deletions
diff --git a/test/profile/Inputs/gcc-flag-compatibility.c b/test/profile/Inputs/gcc-flag-compatibility.c
new file mode 100644
index 000000000000..1c07bb1d0f30
--- /dev/null
+++ b/test/profile/Inputs/gcc-flag-compatibility.c
@@ -0,0 +1,8 @@
+int X = 0;
+
+int main() {
+ int i;
+ for (i = 0; i < 100; i++)
+ X += i;
+ return 0;
+}
diff --git a/test/profile/Inputs/instrprof-dynamic-a.cpp b/test/profile/Inputs/instrprof-dynamic-a.cpp
index 67de263c4d88..2ec484a5b381 100644
--- a/test/profile/Inputs/instrprof-dynamic-a.cpp
+++ b/test/profile/Inputs/instrprof-dynamic-a.cpp
@@ -1,7 +1,7 @@
#include "instrprof-dynamic-header.h"
void a() {
if (true) {
- bar<void>();
- bar<char>();
+ bar<void>(1);
+ bar<char>(1);
}
}
diff --git a/test/profile/Inputs/instrprof-dynamic-b.cpp b/test/profile/Inputs/instrprof-dynamic-b.cpp
index c8fb75ef52ed..5c2d9bae8dba 100644
--- a/test/profile/Inputs/instrprof-dynamic-b.cpp
+++ b/test/profile/Inputs/instrprof-dynamic-b.cpp
@@ -1,7 +1,7 @@
#include "instrprof-dynamic-header.h"
void b() {
if (true) {
- bar<void>();
- bar<int>();
+ bar<void>(1);
+ bar<int>(1);
}
}
diff --git a/test/profile/Inputs/instrprof-dynamic-header.h b/test/profile/Inputs/instrprof-dynamic-header.h
index 1dc2e37ef82c..7a57b13c67f9 100644
--- a/test/profile/Inputs/instrprof-dynamic-header.h
+++ b/test/profile/Inputs/instrprof-dynamic-header.h
@@ -1,5 +1,7 @@
-template <class T> void bar() {
- if (true) {}
+template <class T> void bar(int X) {
+ if (X) {
+ X *= 4;
+ }
}
void a();
void b();
diff --git a/test/profile/Inputs/instrprof-dynamic-main.cpp b/test/profile/Inputs/instrprof-dynamic-main.cpp
index 0dd60213926e..2cf37c8b6d5e 100644
--- a/test/profile/Inputs/instrprof-dynamic-main.cpp
+++ b/test/profile/Inputs/instrprof-dynamic-main.cpp
@@ -2,7 +2,7 @@
void foo(int K) { if (K) {} }
int main(int argc, char *argv[]) {
foo(5);
- bar<void>();
+ bar<void>(1);
a();
b();
return 0;