aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Support
diff options
context:
space:
mode:
authorJeff Cohen <jeffc@jolt-lang.org>2005-10-07 05:29:25 +0000
committerJeff Cohen <jeffc@jolt-lang.org>2005-10-07 05:29:25 +0000
commitcadee65f5411a09f6a75157febaac668fc1bd56e (patch)
treee554405f571383774af2715d7f80b26833aee56d /include/llvm/Support
parent68d98e0bdc1092cf5083dd11867225afaae34b66 (diff)
downloadexternal_llvm-cadee65f5411a09f6a75157febaac668fc1bd56e.zip
external_llvm-cadee65f5411a09f6a75157febaac668fc1bd56e.tar.gz
external_llvm-cadee65f5411a09f6a75157febaac668fc1bd56e.tar.bz2
Remove prolific source of VC++ truncation warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23657 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support')
-rw-r--r--include/llvm/Support/MathExtras.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/Support/MathExtras.h b/include/llvm/Support/MathExtras.h
index 1dbcf43..32cc473 100644
--- a/include/llvm/Support/MathExtras.h
+++ b/include/llvm/Support/MathExtras.h
@@ -184,7 +184,8 @@ inline unsigned CountPopulation_32(unsigned Value) {
// CountPopulation_64 - this function counts the number of set bits in a value,
// (64 bit edition.)
inline unsigned CountPopulation_64(uint64_t Value) {
- return CountPopulation_32(Value >> 32) + CountPopulation_32(Value);
+ return CountPopulation_32(unsigned(Value >> 32)) +
+ CountPopulation_32(unsigned(Value));
}
// Log2_32 - This function returns the floor log base 2 of the specified value,