llvm.org GIT mirror llvm / 7242a4f
Use Nakamura's suggestion of bypassing using 'filename' and just the pointers directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153558 91177308-0d34-0410-b5e6-96231b3b80d8 Bill Wendling 8 years ago
1 changed file(s) with 2 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
113113 output_file = fopen(filename, "wb");
114114
115115 if (!output_file) {
116 const char *cptr = 0;
117 filename[0] = '\0'; /* The size of filename should be big enough. */
118 cptr = strrchr(orig_filename, '/');
119 strcat(filename, cptr ? cptr + 1 : orig_filename);
120 output_file = fopen(filename, "wb");
116 const char *cptr = strrchr(orig_filename, '/');
117 output_file = fopen(cptr ? cptr + 1 : orig_filename, "wb");
121118
122119 if (!output_file) {
123120 fprintf(stderr, "LLVM profiling runtime: while opening '%s': ",