Skip to content

Commit cd71f51

Browse files
committed
[Mangler] Fix a bug in the bit width calculation of numbers representing strings.
The bug is that zext expects the bitwidth to be different, which is incorrect since the bitwidth does not change most of the times.
1 parent 2d6f3c3 commit cd71f51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ABI/Compression.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ static char DecodeFixedWidth(APInt &num) {
151151

152152
APInt Quotient(BW, 0), Remainder(BW, 0);
153153
APInt::udivrem(num, C, Quotient, Remainder);
154-
num = Quotient.zext(BW);
154+
num = Quotient.zextOrSelf(BW);
155155
return Huffman::Charset[Remainder.getZExtValue()];
156156
}
157157

0 commit comments

Comments
 (0)