Use version 402 for the GCDA files when compiling for Apple.
authorBill Wendling <isanbard@gmail.com>
Thu, 28 Jul 2011 18:12:20 +0000 (18:12 +0000)
committerBill Wendling <isanbard@gmail.com>
Thu, 28 Jul 2011 18:12:20 +0000 (18:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136369 91177308-0d34-0410-b5e6-96231b3b80d8

runtime/libprofile/GCDAProfiling.c

index e066b227c5c183922215a9975261097257ffdcb1..ac3a62c79f4bbc7a1e60e5697e72cbc53a59310f 100644 (file)
@@ -114,7 +114,11 @@ void llvm_gcda_start_file(const char *orig_filename) {
   output_file = fopen(filename, "wb");
 
   /* gcda file, version 404*, stamp LLVM. */
+#ifdef __APPLE__
+  fwrite("adcg*204MVLL", 12, 1, output_file);
+#else
   fwrite("adcg*404MVLL", 12, 1, output_file);
+#endif
 
 #ifdef DEBUG_GCDAPROFILING
   printf("llvmgcda: [%s]\n", orig_filename);