[Lldb-commits] [lldb] 542d88d - [lldb][nfc] Fix incorrect union usage in UnwindAssemblyInstEmulation (#168341)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Nov 18 02:06:45 PST 2025
Author: Felipe de Azevedo Piovezan
Date: 2025-11-18T10:06:40Z
New Revision: 542d88d2a861577433ea64e99b97cbfbf1c50b8a
URL: https://github.com/llvm/llvm-project/commit/542d88d2a861577433ea64e99b97cbfbf1c50b8a
DIFF: https://github.com/llvm/llvm-project/commit/542d88d2a861577433ea64e99b97cbfbf1c50b8a.diff
LOG: [lldb][nfc] Fix incorrect union usage in UnwindAssemblyInstEmulation (#168341)
This is harmless due to the previous checks for > 0, but it is still
confusing for the readers.
Added:
Modified:
lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
Removed:
################################################################################
diff --git a/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp b/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
index 8437a51471ca2..987586b97dfdc 100644
--- a/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
+++ b/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
@@ -507,12 +507,12 @@ bool UnwindAssemblyInstEmulation::WriteRegister(
case EmulateInstruction::eContextRelativeBranchImmediate: {
if (context.GetInfoType() == EmulateInstruction::eInfoTypeISAAndImmediate &&
context.info.ISAAndImmediate.unsigned_data32 > 0) {
- m_forward_branch_offset =
- context.info.ISAAndImmediateSigned.signed_data32;
+ m_forward_branch_offset = context.info.ISAAndImmediate.unsigned_data32;
} else if (context.GetInfoType() ==
EmulateInstruction::eInfoTypeISAAndImmediateSigned &&
context.info.ISAAndImmediateSigned.signed_data32 > 0) {
- m_forward_branch_offset = context.info.ISAAndImmediate.unsigned_data32;
+ m_forward_branch_offset =
+ context.info.ISAAndImmediateSigned.signed_data32;
} else if (context.GetInfoType() ==
EmulateInstruction::eInfoTypeImmediate &&
context.info.unsigned_immediate > 0) {
More information about the lldb-commits
mailing list