From cb2380c9fa4be10aaee30d0a04fd9b354b922802 Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Mon, 26 Aug 2019 18:12:44 +0000 Subject: [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 --- lldb/source/Commands/CommandObjectFrame.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lldb/source/Commands/CommandObjectFrame.cpp') diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp index 4be72c5681b..e519780872f 100644 --- a/lldb/source/Commands/CommandObjectFrame.cpp +++ b/lldb/source/Commands/CommandObjectFrame.cpp @@ -713,11 +713,11 @@ protected: // Increment statistics. bool res = result.Succeeded(); - Target *target = GetSelectedOrDummyTarget(); + Target &target = GetSelectedOrDummyTarget(); if (res) - target->IncrementStats(StatisticKind::FrameVarSuccess); + target.IncrementStats(StatisticKind::FrameVarSuccess); else - target->IncrementStats(StatisticKind::FrameVarFailure); + target.IncrementStats(StatisticKind::FrameVarFailure); return res; } -- cgit v1.2.3