LLDB  mainline
Functions | Variables
ClangExpressionSourceCode.cpp File Reference
#include "ClangExpressionSourceCode.h"
#include "clang/Basic/CharInfo.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 dependency graph for ClangExpressionSourceCode.cpp:

Go to the source code of this file.

Functions

static void AddMacros (const DebugMacros *dm, CompileUnit *comp_unit, AddMacroState &state, StreamString &stream)
 
static bool ExprBodyContainsVar (llvm::StringRef body, llvm::StringRef var)
 Checks if the expression body contains the given variable as a token. More...
 
static void AddLocalVariableDecls (const lldb::VariableListSP &var_list_sp, StreamString &stream, const std::string &expr, lldb::LanguageType wrapping_language)
 

Variables

static const char * c_start_marker = " /*LLDB_BODY_START*/\n "
 
static const char * c_end_marker = ";\n /*LLDB_BODY_END*/\n"
 

Function Documentation

◆ AddLocalVariableDecls()

static void AddLocalVariableDecls ( const lldb::VariableListSP &  var_list_sp,
StreamString stream,
const std::string &  expr,
lldb::LanguageType  wrapping_language 
)
static

◆ AddMacros()

static void AddMacros ( const DebugMacros dm,
CompileUnit comp_unit,
AddMacroState &  state,
StreamString stream 
)
static

◆ ExprBodyContainsVar()

static bool ExprBodyContainsVar ( llvm::StringRef  body,
llvm::StringRef  var 
)
static

Checks if the expression body contains the given variable as a token.

Parameters
bodyThe expression body.
varThe variable token we are looking for.
Returns
True iff the expression body containes the variable as a token.

Definition at line 171 of file ClangExpressionSourceCode.cpp.

Referenced by AddLocalVariableDecls().

Variable Documentation

◆ c_end_marker

const char* c_end_marker = ";\n /*LLDB_BODY_END*/\n"
static

◆ c_start_marker

const char* c_start_marker = " /*LLDB_BODY_START*/\n "
static