Clear hardware capabilities for gcc.dg/vect/vect-simd-clone-*.c
[official-gcc.git] / libsanitizer / asan / asan_mac.h
blob2d1d4b0bfb33d6e11309659a281763171a89fb1b
1 //===-- asan_mac.h ----------------------------------------------*- C++ -*-===//
2 //
3 // This file is distributed under the University of Illinois Open Source
4 // License. See LICENSE.TXT for details.
5 //
6 //===----------------------------------------------------------------------===//
7 //
8 // This file is a part of AddressSanitizer, an address sanity checker.
9 //
10 // Mac-specific ASan definitions.
11 //===----------------------------------------------------------------------===//
12 #ifndef ASAN_MAC_H
13 #define ASAN_MAC_H
15 // CF_RC_BITS, the layout of CFRuntimeBase and __CFStrIsConstant are internal
16 // and subject to change in further CoreFoundation versions. Apple does not
17 // guarantee any binary compatibility from release to release.
19 // See http://opensource.apple.com/source/CF/CF-635.15/CFInternal.h
20 #if defined(__BIG_ENDIAN__)
21 #define CF_RC_BITS 0
22 #endif
24 #if defined(__LITTLE_ENDIAN__)
25 #define CF_RC_BITS 3
26 #endif
28 // See http://opensource.apple.com/source/CF/CF-635.15/CFRuntime.h
29 typedef struct __CFRuntimeBase {
30 uptr _cfisa;
31 u8 _cfinfo[4];
32 #if __LP64__
33 u32 _rc;
34 #endif
35 } CFRuntimeBase;
37 enum MacosVersion {
38 MACOS_VERSION_UNINITIALIZED = 0,
39 MACOS_VERSION_UNKNOWN,
40 MACOS_VERSION_LEOPARD,
41 MACOS_VERSION_SNOW_LEOPARD,
42 MACOS_VERSION_LION,
43 MACOS_VERSION_MOUNTAIN_LION,
44 MACOS_VERSION_MAVERICKS
47 // Used by asan_malloc_mac.cc and asan_mac.cc
48 extern "C" void __CFInitialize();
50 namespace __asan {
52 MacosVersion GetMacosVersion();
53 void MaybeReplaceCFAllocator();
55 } // namespace __asan
57 #endif // ASAN_MAC_H