Skip to content

Commit 6c96aff

Browse files
committed
Merge commit '68fd102598a2' from llvm.org/main into next
2 parents fd7cfde + 68fd102 commit 6c96aff

File tree

1 file changed

+20
-19
lines changed

1 file changed

+20
-19
lines changed

lldb/source/Target/StopInfo.cpp

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -851,8 +851,9 @@ class StopInfoWatchpoint : public StopInfo {
851851
// We have to step over the watchpoint before we know what to do:
852852
StopInfoWatchpointSP me_as_siwp_sp
853853
= std::static_pointer_cast<StopInfoWatchpoint>(shared_from_this());
854-
ThreadPlanSP step_over_wp_sp(new ThreadPlanStepOverWatchpoint(
855-
*(thread_sp.get()), me_as_siwp_sp, wp_sp));
854+
ThreadPlanSP step_over_wp_sp =
855+
std::make_shared<ThreadPlanStepOverWatchpoint>(*(thread_sp.get()),
856+
me_as_siwp_sp, wp_sp);
856857
// When this plan is done we want to stop, so set this as a Controlling
857858
// plan.
858859
step_over_wp_sp->SetIsControllingPlan(true);
@@ -1481,84 +1482,84 @@ StopInfoSP StopInfo::CreateStopReasonWithBreakpointSiteID(Thread &thread,
14811482
break_id_t break_id) {
14821483
thread.SetThreadHitBreakpointSite();
14831484

1484-
return StopInfoSP(new StopInfoBreakpoint(thread, break_id));
1485+
return std::make_shared<StopInfoBreakpoint>(thread, break_id);
14851486
}
14861487

14871488
StopInfoSP StopInfo::CreateStopReasonWithBreakpointSiteID(Thread &thread,
14881489
break_id_t break_id,
14891490
bool should_stop) {
1490-
return StopInfoSP(new StopInfoBreakpoint(thread, break_id, should_stop));
1491+
return std::make_shared<StopInfoBreakpoint>(thread, break_id, should_stop);
14911492
}
14921493

14931494
// LWP_TODO: We'll need a CreateStopReasonWithWatchpointResourceID akin
14941495
// to CreateStopReasonWithBreakpointSiteID
14951496
StopInfoSP StopInfo::CreateStopReasonWithWatchpointID(Thread &thread,
14961497
break_id_t watch_id,
14971498
bool silently_continue) {
1498-
return StopInfoSP(
1499-
new StopInfoWatchpoint(thread, watch_id, silently_continue));
1499+
return std::make_shared<StopInfoWatchpoint>(thread, watch_id,
1500+
silently_continue);
15001501
}
15011502

15021503
StopInfoSP StopInfo::CreateStopReasonWithSignal(Thread &thread, int signo,
15031504
const char *description,
15041505
std::optional<int> code) {
15051506
thread.GetProcess()->GetUnixSignals()->IncrementSignalHitCount(signo);
1506-
return StopInfoSP(new StopInfoUnixSignal(thread, signo, description, code));
1507+
return std::make_shared<StopInfoUnixSignal>(thread, signo, description, code);
15071508
}
15081509

15091510
StopInfoSP StopInfo::CreateStopReasonWithInterrupt(Thread &thread, int signo,
15101511
const char *description) {
1511-
return StopInfoSP(new StopInfoInterrupt(thread, signo, description));
1512+
return std::make_shared<StopInfoInterrupt>(thread, signo, description);
15121513
}
15131514

15141515
StopInfoSP StopInfo::CreateStopReasonToTrace(Thread &thread) {
1515-
return StopInfoSP(new StopInfoTrace(thread));
1516+
return std::make_shared<StopInfoTrace>(thread);
15161517
}
15171518

15181519
StopInfoSP
15191520
StopInfo::CreateStopReasonWithPlan(ThreadPlanSP &plan_sp,
15201521
ValueObjectSP return_valobj_sp,
15211522
ExpressionVariableSP expression_variable_sp,
15221523
bool return_is_swift_error_value) {
1523-
return StopInfoSP(new StopInfoThreadPlan(plan_sp, return_valobj_sp,
1524-
expression_variable_sp,
1525-
return_is_swift_error_value));
1524+
return std::make_shared<StopInfoThreadPlan>(plan_sp, return_valobj_sp,
1525+
expression_variable_sp,
1526+
return_is_swift_error_value);
15261527
}
15271528

15281529
StopInfoSP StopInfo::CreateStopReasonWithException(Thread &thread,
15291530
const char *description) {
1530-
return StopInfoSP(new StopInfoException(thread, description));
1531+
return std::make_shared<StopInfoException>(thread, description);
15311532
}
15321533

15331534
StopInfoSP StopInfo::CreateStopReasonProcessorTrace(Thread &thread,
15341535
const char *description) {
1535-
return StopInfoSP(new StopInfoProcessorTrace(thread, description));
1536+
return std::make_shared<StopInfoProcessorTrace>(thread, description);
15361537
}
15371538

15381539
StopInfoSP StopInfo::CreateStopReasonHistoryBoundary(Thread &thread,
15391540
const char *description) {
1540-
return StopInfoSP(new StopInfoHistoryBoundary(thread, description));
1541+
return std::make_shared<StopInfoHistoryBoundary>(thread, description);
15411542
}
15421543

15431544
StopInfoSP StopInfo::CreateStopReasonWithExec(Thread &thread) {
1544-
return StopInfoSP(new StopInfoExec(thread));
1545+
return std::make_shared<StopInfoExec>(thread);
15451546
}
15461547

15471548
StopInfoSP StopInfo::CreateStopReasonFork(Thread &thread,
15481549
lldb::pid_t child_pid,
15491550
lldb::tid_t child_tid) {
1550-
return StopInfoSP(new StopInfoFork(thread, child_pid, child_tid));
1551+
return std::make_shared<StopInfoFork>(thread, child_pid, child_tid);
15511552
}
15521553

15531554

15541555
StopInfoSP StopInfo::CreateStopReasonVFork(Thread &thread,
15551556
lldb::pid_t child_pid,
15561557
lldb::tid_t child_tid) {
1557-
return StopInfoSP(new StopInfoVFork(thread, child_pid, child_tid));
1558+
return std::make_shared<StopInfoVFork>(thread, child_pid, child_tid);
15581559
}
15591560

15601561
StopInfoSP StopInfo::CreateStopReasonVForkDone(Thread &thread) {
1561-
return StopInfoSP(new StopInfoVForkDone(thread));
1562+
return std::make_shared<StopInfoVForkDone>(thread);
15621563
}
15631564

15641565
ValueObjectSP StopInfo::GetReturnValueObject(StopInfoSP &stop_info_sp,

0 commit comments

Comments
 (0)