summaryrefslogtreecommitdiff
path: root/include/llvm/Support
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Support')
-rw-r--r--include/llvm/Support/MathExtras.h2
-rw-r--r--include/llvm/Support/SlowOperationInformer.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/Support/MathExtras.h b/include/llvm/Support/MathExtras.h
index 65f6ed3f75..ed21bb0526 100644
--- a/include/llvm/Support/MathExtras.h
+++ b/include/llvm/Support/MathExtras.h
@@ -76,7 +76,7 @@ inline bool isPowerOf2_32(unsigned Value) {
// isPowerOf2_64 - This function returns true if the argument is a power of two
// > 0 (64 bit edition.)
inline bool isPowerOf2_64(uint64_t Value) {
- return Value && !(Value & (Value - 1LL));
+ return Value && !(Value & (Value - int64_t(1L)));
}
// ByteSwap_16 - This function returns a byte-swapped representation of the
diff --git a/include/llvm/Support/SlowOperationInformer.h b/include/llvm/Support/SlowOperationInformer.h
index 0486406138..80ece41834 100644
--- a/include/llvm/Support/SlowOperationInformer.h
+++ b/include/llvm/Support/SlowOperationInformer.h
@@ -57,7 +57,7 @@ namespace llvm {
void progress(unsigned Current, unsigned Maximum) {
assert(Maximum != 0 &&
"Shouldn't be doing work if there is nothing to do!");
- progress(Current*1000ULL/Maximum);
+ progress(Current*uint64_t(1000UL)/Maximum);
}
};
} // end namespace llvm