[Lldb-commits] [lldb] r335273 - Remove duplicated check and shared_ptr copying.
Tatyana Krasnukha via lldb-commits
lldb-commits at lists.llvm.org
Thu Jun 21 12:19:57 PDT 2018
Author: tkrasnukha
Date: Thu Jun 21 12:19:57 2018
New Revision: 335273
URL: http://llvm.org/viewvc/llvm-project?rev=335273&view=rev
Log:
Remove duplicated check and shared_ptr copying.
Modified:
lldb/trunk/source/Commands/CommandObjectDisassemble.cpp
Modified: lldb/trunk/source/Commands/CommandObjectDisassemble.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectDisassemble.cpp?rev=335273&r1=335272&r2=335273&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectDisassemble.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectDisassemble.cpp Thu Jun 21 12:19:57 2018
@@ -161,10 +161,9 @@ Status CommandObjectDisassemble::Command
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;
More information about the lldb-commits
mailing list