aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Interpreter/CommandObject.cpp
diff options
context:
space:
mode:
authorRaphael Isemann <teemperor@gmail.com>2019-08-26 18:12:44 +0000
committerRaphael Isemann <teemperor@gmail.com>2019-08-26 18:12:44 +0000
commitcb2380c9fa4be10aaee30d0a04fd9b354b922802 (patch)
tree989627356414cb6f2b1b65cc2c43cf5e43ce7fc4 /lldb/source/Interpreter/CommandObject.cpp
parent8679ef4e46a4d7b46a521a905d60357854117d43 (diff)
downloadllvm-cb2380c9fa4be10aaee30d0a04fd9b354b922802.zip
llvm-cb2380c9fa4be10aaee30d0a04fd9b354b922802.tar.gz
llvm-cb2380c9fa4be10aaee30d0a04fd9b354b922802.tar.bz2
[lldb][NFC] Remove dead code that handles situations where LLDB has no dummy target
Summary: We always have a dummy target, so any error handling regarding a missing dummy target is dead code now. Also makes the CommandObject methods that return Target& to express this fact in the API. This patch just for the CommandObject part of LLDB. I'll migrate the rest of LLDB in a follow-up patch that's WIP. Reviewers: labath Reviewed By: labath Subscribers: abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D66737 llvm-svn: 369939
Diffstat (limited to 'lldb/source/Interpreter/CommandObject.cpp')
-rw-r--r--lldb/source/Interpreter/CommandObject.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lldb/source/Interpreter/CommandObject.cpp b/lldb/source/Interpreter/CommandObject.cpp
index eb38971..82939b8 100644
--- a/lldb/source/Interpreter/CommandObject.cpp
+++ b/lldb/source/Interpreter/CommandObject.cpp
@@ -917,12 +917,12 @@ const char *CommandObject::GetArgumentDescriptionAsCString(
return g_arguments_data[arg_type].help_text;
}
-Target *CommandObject::GetDummyTarget() {
- return m_interpreter.GetDebugger().GetDummyTarget();
+Target &CommandObject::GetDummyTarget() {
+ return *m_interpreter.GetDebugger().GetDummyTarget();
}
-Target *CommandObject::GetSelectedOrDummyTarget(bool prefer_dummy) {
- return m_interpreter.GetDebugger().GetSelectedOrDummyTarget(prefer_dummy);
+Target &CommandObject::GetSelectedOrDummyTarget(bool prefer_dummy) {
+ return *m_interpreter.GetDebugger().GetSelectedOrDummyTarget(prefer_dummy);
}
Thread *CommandObject::GetDefaultThread() {