1 //===-- ExpressionSourceCode.h ----------------------------------*- 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 #ifndef liblldb_ExpressionSourceCode_h 10 #define liblldb_ExpressionSourceCode_h 11 12 #include "lldb/lldb-enumerations.h" 13 #include "llvm/ADT/ArrayRef.h" 14 15 #include <string> 16 17 namespace lldb_private { 18 19 class ExpressionSourceCode { 20 public: 21 bool NeedsWrapping() const { return m_wrap; } 22 23 const char *GetName() const { return m_name.c_str(); } 24 25 protected: 26 ExpressionSourceCode(const char *name, const char *prefix, const char *body, 27 bool wrap) 28 : m_name(name), m_prefix(prefix), m_body(body), m_wrap(wrap) {} 29 30 std::string m_name; 31 std::string m_prefix; 32 std::string m_body; 33 bool m_wrap; 34 }; 35 36 } // namespace lldb_private 37 38 #endif 39