aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Bitcode
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-04-01 18:45:54 +0000
committerDan Gohman <gohman@apple.com>2009-04-01 18:45:54 +0000
commitd06cad6dacf2217ce7a88eebf5b0c164b3fbdd41 (patch)
treefaf864647d57a6d0f3e6e16f199b0559be489e5f /include/llvm/Bitcode
parent37c934b0124b43e08e58eb222521c0f188ec9c53 (diff)
downloadexternal_llvm-d06cad6dacf2217ce7a88eebf5b0c164b3fbdd41.zip
external_llvm-d06cad6dacf2217ce7a88eebf5b0c164b3fbdd41.tar.gz
external_llvm-d06cad6dacf2217ce7a88eebf5b0c164b3fbdd41.tar.bz2
Use CHAR_BIT instead of hard-coding 8 in several places where it
is appropriate. This helps visually differentiate host-oriented calculations from target-oriented calculations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68227 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Bitcode')
-rw-r--r--include/llvm/Bitcode/BitstreamReader.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/Bitcode/BitstreamReader.h b/include/llvm/Bitcode/BitstreamReader.h
index 7cbd10f..48eaa36 100644
--- a/include/llvm/Bitcode/BitstreamReader.h
+++ b/include/llvm/Bitcode/BitstreamReader.h
@@ -16,6 +16,7 @@
#define BITSTREAM_READER_H
#include "llvm/Bitcode/BitCodes.h"
+#include <climits>
#include <vector>
namespace llvm {
@@ -114,7 +115,7 @@ public:
/// GetCurrentBitNo - Return the bit # of the bit we are reading.
uint64_t GetCurrentBitNo() const {
- return (NextChar-FirstChar)*8 + ((32-BitsInCurWord) & 31);
+ return (NextChar-FirstChar)*CHAR_BIT + ((32-BitsInCurWord) & 31);
}
/// JumpToBit - Reset the stream to the specified bit number.