summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTatyana Krasnukha <tatyana@synopsys.com>2018-06-21 19:19:57 +0000
committerTatyana Krasnukha <tatyana@synopsys.com>2018-06-21 19:19:57 +0000
commitbe73fd6b5d4f2f10202e0f24fe0e1bfd1fb5a690 (patch)
tree51276c1ab640de7b44292b7e1df0aba5534bb71a
parentac599b69510baf046c915a94a68c36d7a9d64280 (diff)
downloadbcm5719-llvm-be73fd6b5d4f2f10202e0f24fe0e1bfd1fb5a690.tar.gz
bcm5719-llvm-be73fd6b5d4f2f10202e0f24fe0e1bfd1fb5a690.zip
Remove duplicated check and shared_ptr copying.
llvm-svn: 335273
-rw-r--r--lldb/source/Commands/CommandObjectDisassemble.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lldb/source/Commands/CommandObjectDisassemble.cpp b/lldb/source/Commands/CommandObjectDisassemble.cpp
index 497a9b72450..519e5e2dcdb 100644
--- a/lldb/source/Commands/CommandObjectDisassemble.cpp
+++ b/lldb/source/Commands/CommandObjectDisassemble.cpp
@@ -161,10 +161,9 @@ Status CommandObjectDisassemble::CommandOptions::SetOptionValue(
case 'A':
if (execution_context) {
- auto target_sp =
- execution_context ? execution_context->GetTargetSP() : TargetSP();
- auto platform_sp = target_sp ? target_sp->GetPlatform() : PlatformSP();
- arch = Platform::GetAugmentedArchSpec(platform_sp.get(), option_arg);
+ const auto &target_sp = execution_context->GetTargetSP();
+ auto platform_ptr = target_sp ? target_sp->GetPlatform().get() : nullptr;
+ arch = Platform::GetAugmentedArchSpec(platform_ptr, option_arg);
}
break;
OpenPOWER on IntegriCloud