]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/Expression/ExpressionTypeSystemHelper.h
MFV 354917, 354918, 354919
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / Expression / ExpressionTypeSystemHelper.h
1 //===-- ExpressionTypeSystemHelper.h ---------------------------------*- C++
2 //-*-===//
3 //
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
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 /// \class ExpressionTypeSystemHelper ExpressionTypeSystemHelper.h
18 /// "lldb/Expression/ExpressionTypeSystemHelper.h"
19 /// A helper object that the Expression can pass to its ExpressionParser
20 /// to provide generic information that
21 /// any type of expression will need to supply.  It's only job is to support
22 /// dyn_cast so that the expression parser can cast it back to the requisite
23 /// specific type.
24 ///
25
26 class ExpressionTypeSystemHelper {
27 public:
28   enum LLVMCastKind {
29     eKindClangHelper,
30     eKindSwiftHelper,
31     eKindGoHelper,
32     kNumKinds
33   };
34
35   LLVMCastKind getKind() const { return m_kind; }
36
37   ExpressionTypeSystemHelper(LLVMCastKind kind) : m_kind(kind) {}
38
39   ~ExpressionTypeSystemHelper() {}
40
41 protected:
42   LLVMCastKind m_kind;
43 };
44
45 } // namespace lldb_private
46
47 #endif /* ExpressionTypeSystemHelper_h */