clayborg requested changes to this revision. clayborg added a comment. This revision now requires changes to proceed.
Looks fine. Seems like you should use your a const reference in a few places and this will be good to go? ================ Comment at: source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp:1036 if (error.Success()) { - lldb_private::ArchSpec arch; - if (m_thread.GetProcess().GetArchitecture(arch)) { - void *target_address = ((uint8_t *)®s) + offset + - 4 * (arch.GetMachine() == llvm::Triple::mips); - value.SetUInt(*(uint32_t *)target_address, size); - } else - error.SetErrorString("failed to get architecture"); + lldb_private::ArchSpec arch = m_thread.GetProcess().GetArchitecture(); + void *target_address = ((uint8_t *)®s) + offset + ---------------- Avoid a copy here by using a const reference? ================ Comment at: source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp:147 - ArchSpec target_arch; - if (!m_process.GetArchitecture(target_arch)) - return NativeRegisterContextSP(); + ArchSpec target_arch = m_process.GetArchitecture(); ---------------- Void a copy here and use a const reference? https://reviews.llvm.org/D39733 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits