1 //===--- ObjCRuntime.h - Objective C runtime features -----------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef CLANG_DRIVER_OBJCRUNTIME_H_
11 #define CLANG_DRIVER_OBJCRUNTIME_H_
18 enum Kind { GNU, NeXT };
20 unsigned RuntimeKind : 1;
22 void setKind(Kind k) { RuntimeKind = k; }
23 Kind getKind() const { return static_cast<Kind>(RuntimeKind); }
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.
30 /// True if the runtime supports ARC zeroing __weak.
33 /// \brief True if the runtime supports subscripting methods.
34 unsigned HasSubscripting : 1;
36 /// True if the runtime provides the following entrypoint:
37 /// void objc_terminate(void);
38 /// If available, this will be called instead of abort() when an
39 /// exception is thrown out of an EH cleanup.
40 unsigned HasTerminate : 1;
42 ObjCRuntime() : RuntimeKind(NeXT), HasARC(false), HasWeak(false),
43 HasSubscripting(false), HasTerminate(false) {}