[compiler-rt] r176618 - Take the GCDA version string as an input to llvm_gcda_start_file.
Nick Lewycky
nicholas at mxc.ca
Thu Mar 7 00:28:54 PST 2013
Author: nicholas
Date: Thu Mar 7 02:28:54 2013
New Revision: 176618
URL: http://llvm.org/viewvc/llvm-project?rev=176618&view=rev
Log:
Take the GCDA version string as an input to llvm_gcda_start_file.
Modified:
compiler-rt/trunk/lib/profile/GCDAProfiling.c
Modified: compiler-rt/trunk/lib/profile/GCDAProfiling.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/GCDAProfiling.c?rev=176618&r1=176617&r2=176618&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/GCDAProfiling.c (original)
+++ compiler-rt/trunk/lib/profile/GCDAProfiling.c Thu Mar 7 02:28:54 2013
@@ -145,7 +145,7 @@ static void recursive_mkdir(char *filena
* profiling enabled will emit to a different file. Only one file may be
* started at a time.
*/
-void llvm_gcda_start_file(const char *orig_filename) {
+void llvm_gcda_start_file(const char *orig_filename, const char version[4]) {
char *filename = mangle_filename(orig_filename);
/* Try just opening the file. */
@@ -167,13 +167,10 @@ void llvm_gcda_start_file(const char *or
}
}
- /* gcda file, version 404*, stamp LLVM. */
-#ifdef __APPLE__
- fwrite("adcg*204MVLL", 12, 1, output_file);
-#else
- fwrite("adcg*404MVLL", 12, 1, output_file);
-#endif
-
+ /* gcda file, version, stamp LLVM. */
+ fwrite("adcg", 4, 1, output_file);
+ fwrite(version, 4, 1, output_file);
+ fwrite("MVLL", 4, 1, output_file);
free(filename);
#ifdef DEBUG_GCDAPROFILING
More information about the llvm-commits
mailing list