summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/LanguageRuntime/ObjC
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/LanguageRuntime/ObjC')
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp5
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp8
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp11
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp7
4 files changed, 19 insertions, 12 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
index fde99473701..1b177829363 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
@@ -31,6 +31,7 @@
#include "lldb/Utility/Status.h"
#include "lldb/Utility/StreamString.h"
+#include <memory>
#include <vector>
using namespace lldb;
@@ -111,10 +112,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;
}
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
index 96e2c098ebf..cd7f332c61e 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
@@ -8,6 +8,7 @@
#include <stdint.h>
+#include <memory>
#include <string>
#include <vector>
@@ -803,10 +804,10 @@ AppleObjCRuntimeV2::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: We don't do catch breakpoints for ObjC yet.
// Should there be some way for the runtime to specify what it can do in this
// regard?
@@ -2549,7 +2550,8 @@ bool AppleObjCRuntimeV2::NonPointerISACache::EvaluateNonPointerISA(
ObjCLanguageRuntime::EncodingToTypeSP AppleObjCRuntimeV2::GetEncodingToType() {
if (!m_encoding_to_type_sp)
- m_encoding_to_type_sp.reset(new AppleObjCTypeEncodingParser(*this));
+ m_encoding_to_type_sp =
+ std::make_shared<AppleObjCTypeEncodingParser>(*this);
return m_encoding_to_type_sp;
}
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
index aeb8294b7a8..bd748448336 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
@@ -8,7 +8,6 @@
//===----------------------------------------------------------------------===//
#include "AppleObjCTrampolineHandler.h"
-
#include "AppleThreadPlanStepThroughObjCTrampoline.h"
#include "lldb/Breakpoint/StoppointCallbackContext.h"
@@ -36,6 +35,8 @@
#include "llvm/ADT/STLExtras.h"
+#include <memory>
+
using namespace lldb;
using namespace lldb_private;
@@ -1048,8 +1049,8 @@ AppleObjCTrampolineHandler::GetStepThroughDispatchPlan(Thread &thread,
log->Printf("Found implementation address in cache: 0x%" PRIx64,
impl_addr);
- ret_plan_sp.reset(
- new ThreadPlanRunToAddress(thread, impl_addr, stop_others));
+ ret_plan_sp = std::make_shared<ThreadPlanRunToAddress>(thread, impl_addr,
+ stop_others);
} else {
// We haven't seen this class/selector pair yet. Look it up.
StreamString errors;
@@ -1128,9 +1129,9 @@ AppleObjCTrampolineHandler::GetStepThroughDispatchPlan(Thread &thread,
// is not safe to run only one thread. So we override the
// stop_others value passed in to us here:
const bool trampoline_stop_others = false;
- ret_plan_sp.reset(new AppleThreadPlanStepThroughObjCTrampoline(
+ ret_plan_sp = std::make_shared<AppleThreadPlanStepThroughObjCTrampoline>(
thread, this, dispatch_values, isa_addr, sel_addr,
- trampoline_stop_others));
+ trampoline_stop_others);
if (log) {
StreamString s;
ret_plan_sp->GetDescription(&s, eDescriptionLevelFull);
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp
index 85fd6620c90..bbfd8075db9 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
#include "AppleThreadPlanStepThroughObjCTrampoline.h"
+
#include "AppleObjCTrampolineHandler.h"
#include "lldb/Expression/DiagnosticManager.h"
#include "lldb/Expression/FunctionCaller.h"
@@ -20,6 +21,8 @@
#include "lldb/Target/ThreadPlanStepOut.h"
#include "lldb/Utility/Log.h"
+#include <memory>
+
using namespace lldb;
using namespace lldb_private;
@@ -183,8 +186,8 @@ bool AppleThreadPlanStepThroughObjCTrampoline::ShouldStop(Event *event_ptr) {
// Extract the target address from the value:
- m_run_to_sp.reset(
- new ThreadPlanRunToAddress(m_thread, target_so_addr, m_stop_others));
+ m_run_to_sp = std::make_shared<ThreadPlanRunToAddress>(
+ m_thread, target_so_addr, m_stop_others);
m_thread.QueueThreadPlan(m_run_to_sp, false);
m_run_to_sp->SetPrivate(true);
return false;
OpenPOWER on IntegriCloud