[llvm-commits] [llvm] r130834 - /llvm/trunk/runtime/libprofile/GCDAProfiling.c

Nick Lewycky nicholas at mxc.ca
Tue May 3 20:58:45 PDT 2011


Author: nicholas
Date: Tue May  3 22:58:45 2011
New Revision: 130834

URL: http://llvm.org/viewvc/llvm-project?rev=130834&view=rev
Log:
Fix crash when not setting GCOV_PREFIX.

Modified:
    llvm/trunk/runtime/libprofile/GCDAProfiling.c

Modified: llvm/trunk/runtime/libprofile/GCDAProfiling.c
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/runtime/libprofile/GCDAProfiling.c?rev=130834&r1=130833&r2=130834&view=diff
==============================================================================
--- llvm/trunk/runtime/libprofile/GCDAProfiling.c (original)
+++ llvm/trunk/runtime/libprofile/GCDAProfiling.c Tue May  3 22:58:45 2011
@@ -54,7 +54,7 @@
   prefix = getenv("GCOV_PREFIX");
 
   if (!prefix)
-    return strdup(filename);
+    return strdup(orig_filename);
 
   filename = malloc(strlen(prefix) + 1 + strlen(orig_filename) + 1);
   strcpy(filename, prefix);





More information about the llvm-commits mailing list