| 1 | //===- OperationKinds.h - Operation enums -----------------------*- C++ -*-===// |
|---|---|
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | // |
| 9 | // This file enumerates the different kinds of operations that can be |
| 10 | // performed by various expressions. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #ifndef LLVM_CLANG_AST_OPERATIONKINDS_H |
| 15 | #define LLVM_CLANG_AST_OPERATIONKINDS_H |
| 16 | |
| 17 | namespace clang { |
| 18 | |
| 19 | /// CastKind - The kind of operation required for a conversion. |
| 20 | enum CastKind { |
| 21 | #define CAST_OPERATION(Name) CK_##Name, |
| 22 | #include "clang/AST/OperationKinds.def" |
| 23 | }; |
| 24 | |
| 25 | enum BinaryOperatorKind { |
| 26 | #define BINARY_OPERATION(Name, Spelling) BO_##Name, |
| 27 | #include "clang/AST/OperationKinds.def" |
| 28 | }; |
| 29 | |
| 30 | enum UnaryOperatorKind { |
| 31 | #define UNARY_OPERATION(Name, Spelling) UO_##Name, |
| 32 | #include "clang/AST/OperationKinds.def" |
| 33 | }; |
| 34 | |
| 35 | /// The kind of bridging performed by the Objective-C bridge cast. |
| 36 | enum ObjCBridgeCastKind { |
| 37 | /// Bridging via __bridge, which does nothing but reinterpret |
| 38 | /// the bits. |
| 39 | OBC_Bridge, |
| 40 | /// Bridging via __bridge_transfer, which transfers ownership of an |
| 41 | /// Objective-C pointer into ARC. |
| 42 | OBC_BridgeTransfer, |
| 43 | /// Bridging via __bridge_retain, which makes an ARC object available |
| 44 | /// as a +1 C pointer. |
| 45 | OBC_BridgeRetained |
| 46 | }; |
| 47 | |
| 48 | } // end namespace clang |
| 49 | |
| 50 | #endif |
| 51 |