aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2025-09-28 10:27:05 -0700
committerGitHub <noreply@github.com>2025-09-28 10:27:05 -0700
commitf7dd258635af4d85bd8f25729c7f56aadb4c5913 (patch)
treeed64502e7c62462ecf69cade835d4bc8fd4e91e5 /llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
parentd30fe62cf15960b0b0b2c15d315fe51bb718822a (diff)
downloadllvm-f7dd258635af4d85bd8f25729c7f56aadb4c5913.zip
llvm-f7dd258635af4d85bd8f25729c7f56aadb4c5913.tar.gz
llvm-f7dd258635af4d85bd8f25729c7f56aadb4c5913.tar.bz2
[ADT] Fix a bug in PackedVector::setValue for signed types (#159239)
Without this patch, we forget to update the sign bit. When we assign: Vec[0] = -1; the sign bit is correctly set to 1. Overwriting the same element: Vec[0] = 1; does not update the sign bit, leaving the 4-bit as 0b1001, which reads -2 according to PackedVector's encoding. (It does not use two's complement.) This patch fixes the bug by clearing the sign bit when we are assigning a non-negative value.
Diffstat (limited to 'llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp')
0 files changed, 0 insertions, 0 deletions