diff options
Diffstat (limited to 'source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp')
-rw-r--r-- | source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp b/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp index 1cfc7a1a022b5..c8884fd5c9b9c 100644 --- a/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp +++ b/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp @@ -1,10 +1,9 @@ //===-- AppleObjCRuntimeV1.cpp --------------------------------------*- C++ //-*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// @@ -32,11 +31,14 @@ #include "lldb/Utility/Status.h" #include "lldb/Utility/StreamString.h" +#include <memory> #include <vector> using namespace lldb; using namespace lldb_private; +char AppleObjCRuntimeV1::ID = 0; + AppleObjCRuntimeV1::AppleObjCRuntimeV1(Process *process) : AppleObjCRuntime(process), m_hash_signature(), m_isa_hash_table_ptr(LLDB_INVALID_ADDRESS) {} @@ -61,9 +63,7 @@ bool AppleObjCRuntimeV1::GetDynamicTypeAndAddress( return !class_type_or_name.IsEmpty(); } -//------------------------------------------------------------------ // Static Functions -//------------------------------------------------------------------ lldb_private::LanguageRuntime * AppleObjCRuntimeV1::CreateInstance(Process *process, lldb::LanguageType language) { @@ -77,15 +77,16 @@ AppleObjCRuntimeV1::CreateInstance(Process *process, ObjCRuntimeVersions::eAppleObjC_V1) return new AppleObjCRuntimeV1(process); else - return NULL; + return nullptr; } else - return NULL; + return nullptr; } void AppleObjCRuntimeV1::Initialize() { PluginManager::RegisterPlugin( GetPluginNameStatic(), "Apple Objective-C Language Runtime - Version 1", - CreateInstance); + CreateInstance, + /*command_callback = */ nullptr, GetBreakpointExceptionPrecondition); } void AppleObjCRuntimeV1::Terminate() { @@ -97,9 +98,7 @@ lldb_private::ConstString AppleObjCRuntimeV1::GetPluginNameStatic() { return g_name; } -//------------------------------------------------------------------ // PluginInterface protocol -//------------------------------------------------------------------ ConstString AppleObjCRuntimeV1::GetPluginName() { return GetPluginNameStatic(); } @@ -112,10 +111,10 @@ AppleObjCRuntimeV1::CreateExceptionResolver(Breakpoint *bkpt, bool catch_bp, BreakpointResolverSP resolver_sp; if (throw_bp) - resolver_sp.reset(new BreakpointResolverName( + resolver_sp = std::make_shared<BreakpointResolverName>( bkpt, std::get<1>(GetExceptionThrowLocation()).AsCString(), eFunctionNameTypeBase, eLanguageTypeUnknown, Breakpoint::Exact, 0, - eLazyBoolNo)); + eLazyBoolNo); // FIXME: don't do catch yet. return resolver_sp; } |