summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.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/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
parentd4a4a32cd94eccbaaa4608b0daac8b820e041214 (diff)
[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/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp')
-rw-r--r--lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
index f2b95028f807..3ef6a3f39aab 100644
--- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
@@ -3943,7 +3943,8 @@ void RSModuleDescriptor::Dump(Stream &strm) const {
void RSGlobalDescriptor::Dump(Stream &strm) const {
strm.Indent(m_name.GetStringRef());
VariableList var_list;
- m_module->m_module->FindGlobalVariables(m_name, nullptr, 1U, var_list);
+ m_module->m_module->FindGlobalVariables(m_name, CompilerDeclContext(), 1U,
+ var_list);
if (var_list.GetSize() == 1) {
auto var = var_list.GetVariableAtIndex(0);
auto type = var->GetType();