aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/API/SBModule.cpp
diff options
context:
space:
mode:
authorRaphael Isemann <teemperor@gmail.com>2020-02-17 19:25:52 +0100
committerRaphael Isemann <teemperor@gmail.com>2020-02-18 08:58:36 +0100
commitf9568a95493aea3ea813bd37cb8c084ec4294e38 (patch)
tree18cbee5474de05502af74939a826bbcb572bfbfc /lldb/source/API/SBModule.cpp
parentd4a4a32cd94eccbaaa4608b0daac8b820e041214 (diff)
downloadllvm-f9568a95493aea3ea813bd37cb8c084ec4294e38.zip
llvm-f9568a95493aea3ea813bd37cb8c084ec4294e38.tar.gz
llvm-f9568a95493aea3ea813bd37cb8c084ec4294e38.tar.bz2
[lldb][NFC] Make all CompilerDeclContext parameters references instead of pointers
Summary: All of our lookup APIs either use `CompilerDeclContext &` or `CompilerDeclContext *` semi-randomly it seems. This leads to us constantly converting between those two types (and doing nullptr checks when going from pointer to reference). It also leads to the confusing situation where we have two possible ways to express that we don't have a CompilerDeclContex: either a nullptr or an invalid CompilerDeclContext (aka a default constructed CompilerDeclContext). This moves all APIs to use references and gets rid of all the nullptr checks and conversions. Reviewers: labath, mib, shafik Reviewed By: labath, shafik Subscribers: shafik, arphaman, abidh, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D74607
Diffstat (limited to 'lldb/source/API/SBModule.cpp')
-rw-r--r--lldb/source/API/SBModule.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lldb/source/API/SBModule.cpp b/lldb/source/API/SBModule.cpp
index a3a5e6a..0811a3a 100644
--- a/lldb/source/API/SBModule.cpp
+++ b/lldb/source/API/SBModule.cpp
@@ -401,8 +401,8 @@ lldb::SBSymbolContextList SBModule::FindFunctions(const char *name,
const bool symbols_ok = true;
const bool inlines_ok = true;
FunctionNameType type = static_cast<FunctionNameType>(name_type_mask);
- module_sp->FindFunctions(ConstString(name), nullptr, type, symbols_ok,
- inlines_ok, *sb_sc_list);
+ module_sp->FindFunctions(ConstString(name), CompilerDeclContext(), type,
+ symbols_ok, inlines_ok, *sb_sc_list);
}
return LLDB_RECORD_RESULT(sb_sc_list);
}
@@ -417,8 +417,8 @@ SBValueList SBModule::FindGlobalVariables(SBTarget &target, const char *name,
ModuleSP module_sp(GetSP());
if (name && module_sp) {
VariableList variable_list;
- module_sp->FindGlobalVariables(ConstString(name), nullptr, max_matches,
- variable_list);
+ module_sp->FindGlobalVariables(ConstString(name), CompilerDeclContext(),
+ max_matches, variable_list);
for (const VariableSP &var_sp : variable_list) {
lldb::ValueObjectSP valobj_sp;
TargetSP target_sp(target.GetSP());