]> CyberLeo.Net >> Repos - FreeBSD/releng/9.0.git/blob - contrib/llvm/tools/clang/include/clang/Driver/ObjCRuntime.h
Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
[FreeBSD/releng/9.0.git] / contrib / llvm / tools / clang / include / clang / Driver / ObjCRuntime.h
1 //===--- ObjCRuntime.h - Objective C runtime features -----------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef CLANG_DRIVER_OBJCRUNTIME_H_
11 #define CLANG_DRIVER_OBJCRUNTIME_H_
12
13 namespace clang {
14 namespace driver {
15
16 class ObjCRuntime {
17 public:
18   enum Kind { GNU, NeXT };
19 private:
20   unsigned RuntimeKind : 1;
21 public:
22   void setKind(Kind k) { RuntimeKind = k; }
23   Kind getKind() const { return static_cast<Kind>(RuntimeKind); }
24
25   /// True if the runtime provides native ARC entrypoints.  ARC may
26   /// still be usable without this if the tool-chain provides a
27   /// statically-linked runtime support library.
28   unsigned HasARC : 1;
29
30   /// True if the runtime supports ARC zeroing __weak.
31   unsigned HasWeak : 1;
32
33   /// True if the runtime provides the following entrypoint:
34   ///   void objc_terminate(void);
35   /// If available, this will be called instead of abort() when an
36   /// exception is thrown out of an EH cleanup.
37   unsigned HasTerminate : 1;
38
39   ObjCRuntime() : RuntimeKind(NeXT), HasARC(false), HasWeak(false),
40     HasTerminate(false) {}
41 };
42
43 }
44 }
45
46 #endif