lldb::VariableSP ClangExpressionDeclMap::FindGlobalVariable(
Target &target, ModuleSP &module, ConstString name,
- CompilerDeclContext *namespace_decl) {
+ const CompilerDeclContext &namespace_decl) {
VariableList vars;
if (module && namespace_decl)
- module->FindGlobalVariables(name, *namespace_decl, -1, vars);
+ module->FindGlobalVariables(name, namespace_decl, -1, vars);
else
target.GetImages().FindGlobalVariables(name, -1, vars);
bool ClangExpressionDeclMap::LookupLocalVariable(
NameSearchContext &context, ConstString name, unsigned current_id,
- SymbolContext &sym_ctx, CompilerDeclContext &namespace_decl) {
+ SymbolContext &sym_ctx, const CompilerDeclContext &namespace_decl) {
if (sym_ctx.block == nullptr)
return false;
return sc_func_list;
}
-void ClangExpressionDeclMap::LookupFunction(NameSearchContext &context,
- lldb::ModuleSP module_sp,
- ConstString name,
- CompilerDeclContext &namespace_decl,
- unsigned current_id) {
+void ClangExpressionDeclMap::LookupFunction(
+ NameSearchContext &context, lldb::ModuleSP module_sp, ConstString name,
+ const CompilerDeclContext &namespace_decl, unsigned current_id) {
if (!m_parser_vars)
return;
void ClangExpressionDeclMap::FindExternalVisibleDecls(
NameSearchContext &context, lldb::ModuleSP module_sp,
- CompilerDeclContext &namespace_decl, unsigned int current_id) {
+ const CompilerDeclContext &namespace_decl, unsigned int current_id) {
assert(m_ast_context);
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
if (target) {
ValueObjectSP valobj;
VariableSP var;
- var = FindGlobalVariable(*target, module_sp, name, &namespace_decl);
+ var = FindGlobalVariable(*target, module_sp, name, namespace_decl);
if (var) {
valobj = ValueObjectVariable::Create(target, var);
/// for logging purposes.
void FindExternalVisibleDecls(NameSearchContext &context,
lldb::ModuleSP module,
- CompilerDeclContext &namespace_decl,
+ const CompilerDeclContext &namespace_decl,
unsigned int current_id);
protected:
/// True iff a local variable was found.
bool LookupLocalVariable(NameSearchContext &context, ConstString name,
unsigned current_id, SymbolContext &sym_ctx,
- CompilerDeclContext &namespace_decl);
+ const CompilerDeclContext &namespace_decl);
/// Searches for functions in the given SymbolContextList.
///
/// The ID for the current FindExternalVisibleDecls invocation,
/// for logging purposes.
void LookupFunction(NameSearchContext &context, lldb::ModuleSP module_sp,
- ConstString name, CompilerDeclContext &namespace_decl,
+ ConstString name,
+ const CompilerDeclContext &namespace_decl,
unsigned current_id);
/// Given a target, find a variable that matches the given name and type.
///
/// \return
/// The LLDB Variable found, or NULL if none was found.
- lldb::VariableSP FindGlobalVariable(Target &target, lldb::ModuleSP &module,
- ConstString name,
- CompilerDeclContext *namespace_decl);
+ lldb::VariableSP
+ FindGlobalVariable(Target &target, lldb::ModuleSP &module, ConstString name,
+ const CompilerDeclContext &namespace_decl);
/// Get the value of a variable in a given execution context and return the
/// associated Types if needed.