Skip to content

Commit 2c6272c

Browse files
author
git apple-llvm automerger
committed
Merge commit '5502bd66bb97' from llvm.org/master into apple/main
2 parents ce26e02 + 5502bd6 commit 2c6272c

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

compiler-rt/lib/profile/GCDAProfiling.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -303,16 +303,11 @@ static void unmap_file() {
303303

304304
mmap_handle = NULL;
305305
#else
306-
if (msync(write_buffer, file_size, MS_SYNC) == -1) {
306+
if (munmap(write_buffer, file_size) == -1) {
307307
int errnum = errno;
308-
fprintf(stderr, "profiling: %s: cannot msync: %s\n", filename,
308+
fprintf(stderr, "profiling: %s: cannot munmap: %s\n", filename,
309309
strerror(errnum));
310310
}
311-
312-
/* We explicitly ignore errors from unmapping because at this point the data
313-
* is written and we don't care.
314-
*/
315-
(void)munmap(write_buffer, file_size);
316311
#endif
317312

318313
write_buffer = NULL;

0 commit comments

Comments
 (0)