Skip to content

Commit a24bec5

Browse files
[lldb][nfc] Fix incorrect union usage in UnwindAssemblyInstEmulation (llvm#168341)
This is harmless due to the previous checks for > 0, but it is still confusing for the readers. (cherry picked from commit 542d88d)
1 parent c14d5b4 commit a24bec5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -507,12 +507,12 @@ bool UnwindAssemblyInstEmulation::WriteRegister(
507507
case EmulateInstruction::eContextRelativeBranchImmediate: {
508508
if (context.GetInfoType() == EmulateInstruction::eInfoTypeISAAndImmediate &&
509509
context.info.ISAAndImmediate.unsigned_data32 > 0) {
510-
m_forward_branch_offset =
511-
context.info.ISAAndImmediateSigned.signed_data32;
510+
m_forward_branch_offset = context.info.ISAAndImmediate.unsigned_data32;
512511
} else if (context.GetInfoType() ==
513512
EmulateInstruction::eInfoTypeISAAndImmediateSigned &&
514513
context.info.ISAAndImmediateSigned.signed_data32 > 0) {
515-
m_forward_branch_offset = context.info.ISAAndImmediate.unsigned_data32;
514+
m_forward_branch_offset =
515+
context.info.ISAAndImmediateSigned.signed_data32;
516516
} else if (context.GetInfoType() ==
517517
EmulateInstruction::eInfoTypeImmediate &&
518518
context.info.unsigned_immediate > 0) {

0 commit comments

Comments
 (0)