Currently, it's ignored if the number of set bits isn't divisible by 4.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165116
91177308-0d34-0410-b5e6-
96231b3b80d8
char *CurPtr = EndPtr;
llvm::APSInt NibbleMask(Value.getBitWidth(), Value.isUnsigned());
NibbleMask = 0xf;
- for (int i = 0, e = Value.getActiveBits() / 4; i != e; ++i) {
+ for (int i = 0, e = (Value.getActiveBits() + 3) / 4; i != e; ++i) {
*--CurPtr = 'A' + Temp.And(NibbleMask).getLimitedValue(0xf);
Temp = Temp.lshr(4);
}
IntTemplate<11> eleven;
// CHECK: call {{.*}} @"\01??0?$IntTemplate@$0L@@@QAE@XZ"
+ IntTemplate<256> _256;
+// CHECK: call {{.*}} @"\01??0?$IntTemplate@$0BAA@@@QAE@XZ"
+
+ IntTemplate<513> _513;
+// CHECK: call {{.*}} @"\01??0?$IntTemplate@$0CAB@@@QAE@XZ"
+
+ IntTemplate<1026> _1026;
+// CHECK: call {{.*}} @"\01??0?$IntTemplate@$0EAC@@@QAE@XZ"
+
IntTemplate<65535> ffff;
// CHECK: call {{.*}} @"\01??0?$IntTemplate@$0PPPP@@@QAE@XZ"
}