summaryrefslogtreecommitdiff
path: root/lib/profile/GCDAProfiling.c
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2014-01-19 07:37:29 +0000
committerNick Lewycky <nicholas@mxc.ca>2014-01-19 07:37:29 +0000
commit5e2e8bc2c42503d3f0009b50c3c55cc38d4d9e30 (patch)
tree05701c65fc9708fb801b63d91dacdd130429be18 /lib/profile/GCDAProfiling.c
parent9c7af6cc2a647cbe88d15fbec2b779095aede187 (diff)
Fix think-o from r199332 -- write to the new_filename we're building, not
filename the global variable. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@199572 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/profile/GCDAProfiling.c')
-rw-r--r--lib/profile/GCDAProfiling.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/profile/GCDAProfiling.c b/lib/profile/GCDAProfiling.c
index faae9c060..cf6372628 100644
--- a/lib/profile/GCDAProfiling.c
+++ b/lib/profile/GCDAProfiling.c
@@ -187,7 +187,7 @@ static char *mangle_filename(const char *orig_filename) {
memcpy(new_filename, prefix, prefix_len);
if (prefix[prefix_len - 1] != '/')
- filename[prefix_len++] = '/';
+ new_filename[prefix_len++] = '/';
memcpy(new_filename + prefix_len, fname, filename_len + 1);
return new_filename;