Skip to content

Commit c8f494a

Browse files
committed
[Swift] lldb: Adjust code after result type change in UnwindPlan::Row::GetOffset
See llvm#134662 (cherry picked from commit ef0d652)
1 parent eae4032 commit c8f494a

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
@@ -2569,7 +2569,7 @@ static llvm::Expected<uint32_t> GetFpRegisterNumber(UnwindPlan &unwind_plan,
25692569
}
25702570

25712571
struct FrameSetupInfo {
2572-
addr_t frame_setup_func_offset;
2572+
int64_t frame_setup_func_offset;
25732573
int fp_cfa_offset;
25742574
};
25752575

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

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

0 commit comments

Comments
 (0)