#include "ClangExpressionSourceCode.h"
#include "ClangExpressionUtil.h"
#include "clang/Basic/CharInfo.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Lex/Lexer.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/ADT/StringRef.h"
#include "Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.h"
#include "Plugins/ExpressionParser/Clang/ClangPersistentVariables.h"
#include "lldb/Symbol/Block.h"
#include "lldb/Symbol/CompileUnit.h"
#include "lldb/Symbol/DebugMacros.h"
#include "lldb/Symbol/TypeSystem.h"
#include "lldb/Symbol/VariableList.h"
#include "lldb/Target/ExecutionContext.h"
#include "lldb/Target/Language.h"
#include "lldb/Target/Platform.h"
#include "lldb/Target/StackFrame.h"
#include "lldb/Target/Target.h"
#include "lldb/Utility/StreamString.h"
#include "lldb/lldb-forward.h"
usingnamespacelldb_private;
#define PREFIX_NAME …
#define SUFFIX_NAME …
const llvm::StringRef ClangExpressionSourceCode::g_prefix_file_name = …;
const char *ClangExpressionSourceCode::g_expression_prefix = …;
const char *ClangExpressionSourceCode::g_expression_suffix = …;
namespace {
class AddMacroState { … };
}
static void AddMacros(const DebugMacros *dm, CompileUnit *comp_unit,
AddMacroState &state, StreamString &stream) { … }
lldb_private::ClangExpressionSourceCode::ClangExpressionSourceCode(
llvm::StringRef filename, llvm::StringRef name, llvm::StringRef prefix,
llvm::StringRef body, Wrapping wrap, WrapKind wrap_kind)
: … { … }
namespace {
class TokenVerifier { … };
void AddLambdaCaptureDecls(StreamString &stream, StackFrame *frame,
TokenVerifier const &verifier) { … }
}
TokenVerifier::TokenVerifier(std::string body) { … }
void ClangExpressionSourceCode::AddLocalVariableDecls(StreamString &stream,
const std::string &expr,
StackFrame *frame) const { … }
bool ClangExpressionSourceCode::GetText(
std::string &text, ExecutionContext &exe_ctx, bool add_locals,
bool force_add_all_locals, llvm::ArrayRef<std::string> modules) const { … }
bool ClangExpressionSourceCode::GetOriginalBodyBounds(
std::string transformed_text, size_t &start_loc, size_t &end_loc) { … }