diff options
author | Alexey Samsonov <samsonov@google.com> | 2012-06-04 14:27:50 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2012-06-04 14:27:50 +0000 |
commit | ae4d9caa4f47fa6abcd641719e9f520622940c17 (patch) | |
tree | 368d66ef80ca8ac49164d85b7e1eacbfd1a553c4 /lib/sanitizer_common/sanitizer_mac.cc | |
parent | 603c4be006d8c53905d736bf1f19a49f5ce98276 (diff) | |
download | compiler-rt-ae4d9caa4f47fa6abcd641719e9f520622940c17.tar.gz compiler-rt-ae4d9caa4f47fa6abcd641719e9f520622940c17.tar.bz2 compiler-rt-ae4d9caa4f47fa6abcd641719e9f520622940c17.tar.xz |
Created files sanitizer_linux.cc and sanitizer_mac.cc for platform-specific implementations of common functions. Turned asan_mmap into __sanitizer::internal_mmap.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157930 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_mac.cc')
-rw-r--r-- | lib/sanitizer_common/sanitizer_mac.cc | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/sanitizer_common/sanitizer_mac.cc b/lib/sanitizer_common/sanitizer_mac.cc new file mode 100644 index 00000000..432abed1 --- /dev/null +++ b/lib/sanitizer_common/sanitizer_mac.cc @@ -0,0 +1,31 @@ +//===-- sanitizer_mac.cc --------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file is shared between AddressSanitizer and ThreadSanitizer +// run-time libraries and implements mac-specific functions from +// sanitizer_libc.h. +//===----------------------------------------------------------------------===// + +#ifdef __APPLE__ + +#include "sanitizer_defs.h" +#include "sanitizer_libc.h" + +#include <sys/mman.h> + +namespace __sanitizer { + +void *internal_mmap(void *addr, size_t length, int prot, int flags, + int fd, u64 offset) { + return mmap(addr, length, prot, flags, fd, offset); +} + +} // namespace __sanitizer + +#endif // __APPLE__ |