]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/Expression/ExpressionTypeSystemHelper.h
Merge ^/head r305431 through r305622.
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / Expression / ExpressionTypeSystemHelper.h
1 //===-- ExpressionTypeSystemHelper.h ---------------------------------*- 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 ExpressionTypeSystemHelper_h
11 #define ExpressionTypeSystemHelper_h
12
13 #include "llvm/Support/Casting.h"
14
15 namespace lldb_private
16 {
17
18 //----------------------------------------------------------------------
19 /// @class ExpressionTypeSystemHelper ExpressionTypeSystemHelper.h "lldb/Expression/ExpressionTypeSystemHelper.h"
20 /// @brief A helper object that the Expression can pass to its ExpressionParser to provide generic information that
21 /// any type of expression will need to supply.  It's only job is to support dyn_cast so that the expression parser
22 /// can cast it back to the requisite specific type.
23 ///
24 //----------------------------------------------------------------------
25
26 class ExpressionTypeSystemHelper
27 {
28 public:
29     enum LLVMCastKind {
30         eKindClangHelper,
31         eKindSwiftHelper,
32         eKindGoHelper,
33         kNumKinds
34     };
35
36     LLVMCastKind getKind() const { return m_kind; }
37
38     ExpressionTypeSystemHelper (LLVMCastKind kind) :
39         m_kind(kind)
40     {
41     }
42     
43     ~ExpressionTypeSystemHelper () {}
44
45 protected:
46     LLVMCastKind m_kind;
47 };
48
49
50
51
52 } // namespace lldb_private
53
54 #endif /* ExpressionTypeSystemHelper_h */