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 | 42296c7b5d69e6d79390005b6e1861ca66e3a0cb (patch) | |
tree | 993964118bf9246dab4fd657026ce72a90d3237a /lib/profile/GCDAProfiling.c | |
parent | 93c26022f362c9e0a6acbe3bf3c7c395e19e0835 (diff) |
Take the GCDA version string as an input to llvm_gcda_start_file.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@176618 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/profile/GCDAProfiling.c')
-rw-r--r-- | lib/profile/GCDAProfiling.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/profile/GCDAProfiling.c b/lib/profile/GCDAProfiling.c index 96e9fc2b7..b4f07fbe8 100644 --- a/lib/profile/GCDAProfiling.c +++ b/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 |