Skip to content
Commit 01319e93 authored by Bryan Chan's avatar Bryan Chan
Browse files

Avoid an assertion failure when a bit field is extracted from a value of the same size.

Summary: One of the cases handled by ValueObjectChild::UpdateValue() uses the entire width of the parent's scalar value as the size of the child, and extracts the child by calling Scalar::ExtractBitfield(). This seems valid but APInt::trunc(), APInt::sext() and APInt::zext() assert that the bit field must not have the same size as the parent scalar. Replacing those calls with sextOrTrunc(), zextOrTrunc(), sextOrSelf() and zextOrSelf() fixes the assertion failures.

Reviewers: uweigand, labath

Subscribers: labath, lldb-commits

Differential Revision: http://reviews.llvm.org/D20355

llvm-svn: 270062
parent cda1bd50
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment