From: Nick Lewycky Date: Wed, 4 May 2011 03:58:45 +0000 (+0000) Subject: Fix crash when not setting GCOV_PREFIX. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d006ddc195934cf896d2f5e512d38e196923c79b;p=oota-llvm.git Fix crash when not setting GCOV_PREFIX. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130834 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/runtime/libprofile/GCDAProfiling.c b/runtime/libprofile/GCDAProfiling.c index 2dcf22d9647..13fe0fd873d 100644 --- a/runtime/libprofile/GCDAProfiling.c +++ b/runtime/libprofile/GCDAProfiling.c @@ -54,7 +54,7 @@ static char *mangle_filename(const char *orig_filename) { 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);