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 LLDB_EXPRESSION_EXPRESSIONTYPESYSTEMHELPER_H 11 #define LLDB_EXPRESSION_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() = default; 40 41 protected: 42 LLVMCastKind m_kind; 43 }; 44 45 } // namespace lldb_private 46 47 #endif // LLDB_EXPRESSION_EXPRESSIONTYPESYSTEMHELPER_H 48