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 /// 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;
39 ObjCRuntime() : RuntimeKind(NeXT), HasARC(false), HasWeak(false),
40 HasTerminate(false) {}