From f9568a95493aea3ea813bd37cb8c084ec4294e38 Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Mon, 17 Feb 2020 19:25:52 +0100 Subject: [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 --- .../RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp') 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(); -- cgit v1.2.3