diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-06-27 21:17:53 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-06-27 21:17:53 +0000 |
commit | 007a9771d648ff5e8f6e01a3984f007272e87e37 (patch) | |
tree | ae5ec0f69bbec13a5948903cd98e181e2aa3f897 /lib/profile/GCDAProfiling.c | |
parent | da8596b60b1c90a870c9610c2cef7f06a03b6cdc (diff) |
Revert hack that omits errno on Darwin platforms. We now have an acceptable 'errno' header.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185106 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/profile/GCDAProfiling.c')
-rw-r--r-- | lib/profile/GCDAProfiling.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/lib/profile/GCDAProfiling.c b/lib/profile/GCDAProfiling.c index 4420dbb48..ea62e794a 100644 --- a/lib/profile/GCDAProfiling.c +++ b/lib/profile/GCDAProfiling.c @@ -20,10 +20,7 @@ |* \*===----------------------------------------------------------------------===*/ -#ifndef __APPLE__ #include <errno.h> -#endif - #include <fcntl.h> #include <stdio.h> #include <stdlib.h> @@ -212,11 +209,9 @@ static int map_file() { write_buffer = mmap(0, file_size, PROT_READ | PROT_WRITE, MAP_FILE | MAP_SHARED, fd, 0); if (write_buffer == (void *)-1) { -#ifndef __APPLE__ int errnum = errno; fprintf(stderr, "profiling: %s: cannot map: %s\n", filename, strerror(errnum)); -#endif return -1; } return 0; @@ -224,11 +219,9 @@ static int map_file() { static void unmap_file() { if (msync(write_buffer, file_size, MS_SYNC) == -1) { -#ifndef __APPLE__ int errnum = errno; fprintf(stderr, "profiling: %s: cannot msync: %s\n", filename, strerror(errnum)); -#endif } /* We explicitly ignore errors from unmapping because at this point the data @@ -266,11 +259,9 @@ void llvm_gcda_start_file(const char *orig_filename, const char version[4]) { fd = open(filename, O_RDWR | O_CREAT, 0644); if (fd == -1) { /* Bah! It's hopeless. */ -#ifndef __APPLE__ int errnum = errno; fprintf(stderr, "profiling: %s: cannot open: %s\n", filename, strerror(errnum)); -#endif return; } } |