summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2011-05-04 03:58:45 +0000
committerNick Lewycky <nicholas@mxc.ca>2011-05-04 03:58:45 +0000
commitd006ddc195934cf896d2f5e512d38e196923c79b (patch)
tree3d0288cc71f24006dab5c395b5447c15f510e7e5 /runtime
parentfffb61d042c8d7b920ed58feed58dab09e46bb74 (diff)
downloadllvm-d006ddc195934cf896d2f5e512d38e196923c79b.tar.gz
llvm-d006ddc195934cf896d2f5e512d38e196923c79b.tar.bz2
llvm-d006ddc195934cf896d2f5e512d38e196923c79b.tar.xz
Fix crash when not setting GCOV_PREFIX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130834 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'runtime')
-rw-r--r--runtime/libprofile/GCDAProfiling.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/libprofile/GCDAProfiling.c b/runtime/libprofile/GCDAProfiling.c
index 2dcf22d964..13fe0fd873 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);