summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/profile/GCDAProfiling.c13
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