profile: Fix link errors in this test on darwin
authorJustin Bogner <mail@justinbogner.com>
Fri, 29 May 2015 22:41:25 +0000 (22:41 +0000)
committerJustin Bogner <mail@justinbogner.com>
Fri, 29 May 2015 22:41:25 +0000 (22:41 +0000)
llvm-svn: 238622

compiler-rt/test/profile/Inputs/instrprof-dynamic-a.cpp
compiler-rt/test/profile/Inputs/instrprof-dynamic-b.cpp
compiler-rt/test/profile/Inputs/instrprof-dynamic-header.h
compiler-rt/test/profile/Inputs/instrprof-dynamic-main.cpp

index 67de263..2ec484a 100644 (file)
@@ -1,7 +1,7 @@
 #include "instrprof-dynamic-header.h"
 void a() {
   if (true) {
-    bar<void>();
-    bar<char>();
+    bar<void>(1);
+    bar<char>(1);
   }
 }
index c8fb75e..5c2d9ba 100644 (file)
@@ -1,7 +1,7 @@
 #include "instrprof-dynamic-header.h"
 void b() {
   if (true) {
-    bar<void>();
-    bar<int>();
+    bar<void>(1);
+    bar<int>(1);
   }
 }
index 4d4a513..7a57b13 100644 (file)
@@ -1,5 +1,4 @@
-extern int X;
-template <class T> void bar() {
+template <class T> void bar(int X) {
   if (X) {
     X *= 4;
   }
index 5ba46ad..2cf37c8 100644 (file)
@@ -1,10 +1,8 @@
 #include "instrprof-dynamic-header.h"
-int X = 0;
 void foo(int K) { if (K) {} }
 int main(int argc, char *argv[]) {
   foo(5);
-  X++;
-  bar<void>();
+  bar<void>(1);
   a();
   b();
   return 0;