1 //===-- ExpressionTypeSystemHelper.h ---------------------------------*- C++
2 //-*-===//
3 //
4 //                     The LLVM Compiler Infrastructure
5 //
6 // This file is distributed under the University of Illinois Open Source
7 // License. See LICENSE.TXT for details.
8 //
9 //===----------------------------------------------------------------------===//
10 
11 #ifndef ExpressionTypeSystemHelper_h
12 #define ExpressionTypeSystemHelper_h
13 
14 #include "llvm/Support/Casting.h"
15 
16 namespace lldb_private {
17 
18 //----------------------------------------------------------------------
19 /// @class ExpressionTypeSystemHelper ExpressionTypeSystemHelper.h
20 /// "lldb/Expression/ExpressionTypeSystemHelper.h"
21 /// A helper object that the Expression can pass to its ExpressionParser
22 /// to provide generic information that
23 /// any type of expression will need to supply.  It's only job is to support
24 /// dyn_cast so that the expression parser can cast it back to the requisite
25 /// specific type.
26 ///
27 //----------------------------------------------------------------------
28 
29 class ExpressionTypeSystemHelper {
30 public:
31   enum LLVMCastKind {
32     eKindClangHelper,
33     eKindSwiftHelper,
34     eKindGoHelper,
35     kNumKinds
36   };
37 
getKind()38   LLVMCastKind getKind() const { return m_kind; }
39 
ExpressionTypeSystemHelper(LLVMCastKind kind)40   ExpressionTypeSystemHelper(LLVMCastKind kind) : m_kind(kind) {}
41 
~ExpressionTypeSystemHelper()42   ~ExpressionTypeSystemHelper() {}
43 
44 protected:
45   LLVMCastKind m_kind;
46 };
47 
48 } // namespace lldb_private
49 
50 #endif /* ExpressionTypeSystemHelper_h */
51