diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2013-03-07 08:28:54 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2013-03-07 08:28:54 +0000 |
commit | 8015c6ee2fd5e8daa6be0af02da1ccacb1120334 (patch) | |
tree | be148850d177718bd82cdf682aa562b825abb1b2 /compiler-rt/lib/profile | |
parent | 737a452173a67f88d111f27b688bf3696c260db9 (diff) | |
download | bcm5719-llvm-8015c6ee2fd5e8daa6be0af02da1ccacb1120334.tar.gz bcm5719-llvm-8015c6ee2fd5e8daa6be0af02da1ccacb1120334.zip |
Take the GCDA version string as an input to llvm_gcda_start_file.
llvm-svn: 176618
Diffstat (limited to 'compiler-rt/lib/profile')
-rw-r--r-- | compiler-rt/lib/profile/GCDAProfiling.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/compiler-rt/lib/profile/GCDAProfiling.c b/compiler-rt/lib/profile/GCDAProfiling.c index 96e9fc2b7ff..b4f07fbe824 100644 --- a/compiler-rt/lib/profile/GCDAProfiling.c +++ b/compiler-rt/lib/profile/GCDAProfiling.c @@ -145,7 +145,7 @@ static void recursive_mkdir(char *filename) { * 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 *orig_filename) { } } - /* 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 |