summaryrefslogtreecommitdiffstats
path: root/llvm/runtime/libprofile
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-03-28 01:30:51 +0000
committerBill Wendling <isanbard@gmail.com>2012-03-28 01:30:51 +0000
commit7ca44c2b1eaefe7601f9ada283ce3b72b6b890e2 (patch)
tree9b8bf91c4f940dd644778d67aad7ccf560a6cc3d /llvm/runtime/libprofile
parent2c67006cdd8df5cf7e375d0f837978a263fe7b60 (diff)
downloadbcm5719-llvm-7ca44c2b1eaefe7601f9ada283ce3b72b6b890e2.tar.gz
bcm5719-llvm-7ca44c2b1eaefe7601f9ada283ce3b72b6b890e2.zip
Use Nakamura's suggestion of bypassing using 'filename' and just the pointers directly.
llvm-svn: 153558
Diffstat (limited to 'llvm/runtime/libprofile')
-rw-r--r--llvm/runtime/libprofile/GCDAProfiling.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/runtime/libprofile/GCDAProfiling.c b/llvm/runtime/libprofile/GCDAProfiling.c
index 233a2f390f4..ea2a56a8b05 100644
--- a/llvm/runtime/libprofile/GCDAProfiling.c
+++ b/llvm/runtime/libprofile/GCDAProfiling.c
@@ -114,11 +114,8 @@ void llvm_gcda_start_file(const char *orig_filename) {
output_file = fopen(filename, "wb");
if (!output_file) {
- const char *cptr = 0;
- filename[0] = '\0'; /* The size of filename should be big enough. */
- cptr = strrchr(orig_filename, '/');
- strcat(filename, cptr ? cptr + 1 : orig_filename);
- output_file = fopen(filename, "wb");
+ const char *cptr = strrchr(orig_filename, '/');
+ output_file = fopen(cptr ? cptr + 1 : orig_filename, "wb");
if (!output_file) {
fprintf(stderr, "LLVM profiling runtime: while opening '%s': ",
OpenPOWER on IntegriCloud