summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
diff options
context:
space:
mode:
authorJustin Lebar <justin.lebar@gmail.com>2023-05-28 22:17:20 -0700
committerJustin Lebar <justin.lebar@gmail.com>2023-05-29 08:43:47 -0700
commit420cf6927c35449f234549389e6ce18371cdda24 (patch)
treefb9dfc099f26b9e7e75bc91a3a9fad6c3d7fc7da /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
parent8a56a730f26c52eae38b7614edcc6c37ea033f48 (diff)
[LSV] Return same bitwidth from getConstantOffset.
Previously, getConstantOffset could return an APInt with a different bitwidth than the input pointers. For example, we might be loading an opaque 64-bit pointer, but stripAndAccumulateInBoundsConstantOffsets might give a 32-bit offset. This was OK in most cases because in gatherChains, we casted the APInt back to the original ASPtrBits. But it was not OK when considering selects. We'd call getConstantOffset twice and compare the resulting APInt's, which might not have the same bit width. This fixes that. Now getConstantOffset always returns offsets with the correct width, so we don't need the hack of casting it in gatherChains, and it works correctly when we're handling selects. Differential Revision: https://reviews.llvm.org/D151640
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
0 files changed, 0 insertions, 0 deletions