Skip to content

Commit ef0d652

Browse files
committed
[Swift] lldb: Adjust code after result type change in UnwindPlan::Row::GetOffset
See llvm#134662
1 parent fcf65ee commit ef0d652

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lldb/source/Plugins/LanguageRuntime/Swift/SwiftLanguageRuntime.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2568,7 +2568,7 @@ static llvm::Expected<uint32_t> GetFpRegisterNumber(UnwindPlan &unwind_plan,
25682568
}
25692569

25702570
struct FrameSetupInfo {
2571-
addr_t frame_setup_func_offset;
2571+
int64_t frame_setup_func_offset;
25722572
int fp_cfa_offset;
25732573
};
25742574

@@ -2609,7 +2609,7 @@ GetFrameSetupInfo(UnwindPlan &unwind_plan, RegisterContext &regctx) {
26092609
// This is a frameless function, use large positive offset so that a PC can
26102610
// still be compared against it.
26112611
if (it == fp_locs.end())
2612-
return FrameSetupInfo{std::numeric_limits<addr_t>::max(), 0};
2612+
return FrameSetupInfo{std::numeric_limits<int64_t>::max(), 0};
26132613

26142614
// This is an async function with a frame. The prologue roughly follows this
26152615
// sequence of instructions:
@@ -2656,7 +2656,7 @@ static llvm::Expected<addr_t> ReadAsyncContextRegisterFromUnwind(
26562656
// Is PC before the frame formation? If so, use async register directly.
26572657
// This handles frameless functions, as frame_setup_func_offset is INT_MAX.
26582658
addr_t pc_offset = pc.GetFileAddress() - func_start_addr.GetFileAddress();
2659-
if (pc_offset < frame_setup->frame_setup_func_offset)
2659+
if ((int64_t)pc_offset < frame_setup->frame_setup_func_offset)
26602660
return ReadRegisterAsAddress(regctx, regnums.GetRegisterKind(),
26612661
regnums.async_ctx_regnum);
26622662

0 commit comments

Comments
 (0)