[compiler-rt] r199572 - Fix think-o from r199332 -- write to the new_filename we're building, not

Nick Lewycky nicholas at mxc.ca
Sat Jan 18 23:37:30 PST 2014


Author: nicholas
Date: Sun Jan 19 01:37:29 2014
New Revision: 199572

URL: http://llvm.org/viewvc/llvm-project?rev=199572&view=rev
Log:
Fix think-o from r199332 -- write to the new_filename we're building, not
filename the global variable.

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=199572&r1=199571&r2=199572&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/GCDAProfiling.c (original)
+++ compiler-rt/trunk/lib/profile/GCDAProfiling.c Sun Jan 19 01:37:29 2014
@@ -187,7 +187,7 @@ static char *mangle_filename(const char
   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;





More information about the llvm-commits mailing list