summaryrefslogtreecommitdiffstats
path: root/compiler-rt
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt')
-rw-r--r--compiler-rt/lib/profile/GCDAProfiling.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/compiler-rt/lib/profile/GCDAProfiling.c b/compiler-rt/lib/profile/GCDAProfiling.c
index 1126787ccc8..4d0c41b40c6 100644
--- a/compiler-rt/lib/profile/GCDAProfiling.c
+++ b/compiler-rt/lib/profile/GCDAProfiling.c
@@ -113,21 +113,10 @@ void llvm_gcda_start_file(const char *orig_filename) {
output_file = fopen(filename, "w+b");
if (!output_file) {
- int len = strlen(orig_filename) - 1;
recursive_mkdir(filename);
-
- for (; len >= 0 && orig_filename[len] != '/'; --len)
- /* empty */;
-
- if (len < 0)
- len = 0;
- else if (orig_filename[len] == '/')
- ++len;
-
- output_file = fopen(&orig_filename[len], "w+b");
-
+ output_file = fopen(filename, "w+b");
if (!output_file) {
- fprintf(stderr, "profiling:%s: cannot open\n", &orig_filename[len]);
+ fprintf(stderr, "profiling:%s: cannot open\n", filename);
return;
}
}
OpenPOWER on IntegriCloud