@@ -577,16 +577,16 @@ class SMTConv {
577
577
// Get the bit size and round up to next power of 2, max char size
578
578
if (Ty.isNull ()) {
579
579
unsigned CharTypeSize = Ctx.getTypeSize (Ctx.CharTy );
580
- unsigned pow2DestWidth =
580
+ unsigned Pow2DestWidth =
581
581
std::max (llvm::bit_ceil (Int.getBitWidth ()), CharTypeSize);
582
- Ty = Ctx.getIntTypeForBitwidth (pow2DestWidth , Int.isSigned ());
582
+ Ty = Ctx.getIntTypeForBitwidth (Pow2DestWidth , Int.isSigned ());
583
583
}
584
584
return Ty;
585
585
}
586
586
587
- static inline bool IsPower2 (unsigned bits) {
588
- return bits > 0 && (bits & (bits - 1 )) == 0 ;
589
- }
587
+ // static inline bool IsPower2(unsigned bits) {
588
+ // return bits > 0 && (bits & (bits - 1)) == 0;
589
+ // }
590
590
591
591
// Get the QualTy for the input APSInt, and fix it if it has a bitwidth of 1.
592
592
static inline std::pair<llvm::APSInt, QualType>
@@ -601,8 +601,8 @@ class SMTConv {
601
601
if (APSIntBitwidth == 1 && Ty.isNull ()) {
602
602
NewInt = Int.extend (Ctx.getTypeSize (Ctx.BoolTy ));
603
603
Ty = getAPSIntType (Ctx, NewInt);
604
- } else if (!IsPower2 (APSIntBitwidth) && ! getAPSIntType (Ctx, Int). isNull ()) {
605
- Ty = getAPSIntType (Ctx, Int);
604
+ } else if (!llvm::isPowerOf2_32 (APSIntBitwidth) &&
605
+ ! getAPSIntType (Ctx, Int). isNull ()) {
606
606
NewInt = Int.extend (Ctx.getTypeSize (Ty));
607
607
} else
608
608
NewInt = Int;
0 commit comments