-void FoldingSetImpl::NodeID::AddInteger(uint64_t I) {
- Bits.push_back(unsigned(I));
-
- // If the integer is small, encode it just as 32-bits.
- if ((uint64_t)(int)I != I)
- Bits.push_back(unsigned(I >> 32));
-}
-void FoldingSetImpl::NodeID::AddFloat(float F) {
- Bits.push_back(FloatToBits(F));
+void FoldingSetNodeID::AddInteger(unsigned long I) {
+ if (sizeof(long) == sizeof(int))
+ AddInteger(unsigned(I));
+ else if (sizeof(long) == sizeof(long long)) {
+ AddInteger((unsigned long long)I);
+ } else {
+ llvm_unreachable("unexpected sizeof(long)");
+ }