blob: d0d01b5f9b596a75c675eb5aa531854903c4cee6 [file] [log] [blame]
Andrew Walbran3d2c1972020-04-07 12:24:26 +01001//===-- 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
17namespace lldb_private {
18
19class ExpressionSourceCode {
20public:
21 bool NeedsWrapping() const { return m_wrap; }
22
23 const char *GetName() const { return m_name.c_str(); }
24
25protected:
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