Don't emit the extra checksum into the .gcda file if the user hasn't asked for 
it. Fortunately, versions of gcov that predate the extra checksum also ignore 
any extra data, so this isn't a problem. This matches the API change made in
r176745.
llvm-svn: 176746
diff --git a/compiler-rt/lib/profile/GCDAProfiling.c b/compiler-rt/lib/profile/GCDAProfiling.c
index b4f07fb..c7f74fd 100644
--- a/compiler-rt/lib/profile/GCDAProfiling.c
+++ b/compiler-rt/lib/profile/GCDAProfiling.c
@@ -203,8 +203,11 @@
 #endif
 }
 
-void llvm_gcda_emit_function(uint32_t ident, const char *function_name) {
-  uint32_t len = 3;
+void llvm_gcda_emit_function(uint32_t ident, const char *function_name,
+                             uint8_t use_extra_checksum) {
+  uint32_t len = 2;
+  if (use_extra_checksum)
+    len++;
 #ifdef DEBUG_GCDAPROFILING
   fprintf(stderr, "llvmgcda: function id=0x%08x name=%s\n", ident,
           function_name ? function_name : "NULL");
@@ -218,7 +221,8 @@
   write_int32(len);
   write_int32(ident);
   write_int32(0);
-  write_int32(0);
+  if (use_extra_checksum)
+    write_int32(0);
   if (function_name)
     write_string(function_name);
 }