summaryrefslogtreecommitdiff
path: root/include/lldb/Expression/ExpressionSourceCode.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-08-20 20:51:52 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-08-20 20:51:52 +0000
commit5f29bb8a675e8f96452b632e7129113f7dec850e (patch)
tree3d3f2a0d3ad10872a4dcaba8ec8d1d20c87ab147 /include/lldb/Expression/ExpressionSourceCode.h
parent88c643b6fec27eec436c8d138fee6346e92337d6 (diff)
Notes
Diffstat (limited to 'include/lldb/Expression/ExpressionSourceCode.h')
-rw-r--r--include/lldb/Expression/ExpressionSourceCode.h34
1 files changed, 5 insertions, 29 deletions
diff --git a/include/lldb/Expression/ExpressionSourceCode.h b/include/lldb/Expression/ExpressionSourceCode.h
index b5a6187bf3c5..d0d01b5f9b59 100644
--- a/include/lldb/Expression/ExpressionSourceCode.h
+++ b/include/lldb/Expression/ExpressionSourceCode.h
@@ -1,9 +1,8 @@
//===-- ExpressionSourceCode.h ----------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -11,42 +10,19 @@
#define liblldb_ExpressionSourceCode_h
#include "lldb/lldb-enumerations.h"
+#include "llvm/ADT/ArrayRef.h"
#include <string>
namespace lldb_private {
-class ExecutionContext;
-
class ExpressionSourceCode {
public:
- static const char *g_expression_prefix;
-
- static ExpressionSourceCode *CreateWrapped(const char *prefix,
- const char *body) {
- return new ExpressionSourceCode("$__lldb_expr", prefix, body, true);
- }
-
- static ExpressionSourceCode *CreateUnwrapped(const char *name,
- const char *body) {
- return new ExpressionSourceCode(name, "", body, false);
- }
-
bool NeedsWrapping() const { return m_wrap; }
const char *GetName() const { return m_name.c_str(); }
- bool GetText(std::string &text, lldb::LanguageType wrapping_language,
- bool static_method, ExecutionContext &exe_ctx) const;
-
- // Given a string returned by GetText, find the beginning and end of the body
- // passed to CreateWrapped. Return true if the bounds could be found. This
- // will also work on text with FixItHints applied.
- static bool GetOriginalBodyBounds(std::string transformed_text,
- lldb::LanguageType wrapping_language,
- size_t &start_loc, size_t &end_loc);
-
-private:
+protected:
ExpressionSourceCode(const char *name, const char *prefix, const char *body,
bool wrap)
: m_name(name), m_prefix(prefix), m_body(body), m_wrap(wrap) {}