Skip to content

[upstreaming][NFC] Revert changes to ExpressionSourceCode.h #226

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 3 additions & 19 deletions lldb/include/lldb/Expression/ExpressionSourceCode.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#ifndef liblldb_ExpressionSourceCode_h
#define liblldb_ExpressionSourceCode_h

#include "lldb/Expression/Expression.h"
#include "lldb/lldb-enumerations.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/StringRef.h"
Expand All @@ -30,30 +29,15 @@ class ExpressionSourceCode {

const char *GetName() const { return m_name.c_str(); }

uint32_t GetNumBodyLines();

bool GetText(std::string &text, lldb::LanguageType wrapping_language,
uint32_t language_flags,
const EvaluateExpressionOptions &options,
ExecutionContext &exe_ctx, uint32_t &first_body_line) 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);

protected:
ExpressionSourceCode(llvm::StringRef name, llvm::StringRef prefix,
llvm::StringRef body, Wrapping wrap)
ExpressionSourceCode(llvm::StringRef name, llvm::StringRef prefix,
llvm::StringRef body, Wrapping wrap)
: m_name(name.str()), m_prefix(prefix.str()), m_body(body.str()),
m_num_body_lines(0), m_wrap(wrap) {}
m_wrap(wrap) {}

std::string m_name;
std::string m_prefix;
std::string m_body;
uint32_t m_num_body_lines;
Wrapping m_wrap;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#ifndef liblldb_SwiftExpressionSourceCode_h
#define liblldb_SwiftExpressionSourceCode_h

#include "lldb/Expression/Expression.h"
#include "lldb/Expression/ExpressionSourceCode.h"
#include "lldb/lldb-enumerations.h"

Expand Down