summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/InstrumentationRuntime/TSan/InstrumentationRuntimeTSan.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/InstrumentationRuntime/TSan/InstrumentationRuntimeTSan.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/InstrumentationRuntime/TSan/InstrumentationRuntimeTSan.cpp')
-rw-r--r--lldb/source/Plugins/InstrumentationRuntime/TSan/InstrumentationRuntimeTSan.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Plugins/InstrumentationRuntime/TSan/InstrumentationRuntimeTSan.cpp b/lldb/source/Plugins/InstrumentationRuntime/TSan/InstrumentationRuntimeTSan.cpp
index f4c116e7576c..50f0faefa0f4 100644
--- a/lldb/source/Plugins/InstrumentationRuntime/TSan/InstrumentationRuntimeTSan.cpp
+++ b/lldb/source/Plugins/InstrumentationRuntime/TSan/InstrumentationRuntimeTSan.cpp
@@ -573,7 +573,7 @@ static void GetSymbolDeclarationFromAddress(ProcessSP process_sp, addr_t addr,
return;
VariableList var_list;
- module->FindGlobalVariables(sym_name, nullptr, 1U, var_list);
+ module->FindGlobalVariables(sym_name, CompilerDeclContext(), 1U, var_list);
if (var_list.GetSize() < 1)
return;