mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-17 05:25:47 +00:00
Clean up some inappropriate choices of type in the bitcode reader. None of
these are expected to fix any 64->32 bit real truncation issues. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229153 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -258,8 +258,8 @@ public:
|
|||||||
AF_DontAutoprocessAbbrevs = 2
|
AF_DontAutoprocessAbbrevs = 2
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Advance the current bitstream, returning the next entry in the stream.
|
/// Advance the current bitstream, returning the next entry in the stream.
|
||||||
BitstreamEntry advance(unsigned Flags = 0) {
|
BitstreamEntry advance(unsigned Flags = 0) {
|
||||||
while (1) {
|
while (1) {
|
||||||
unsigned Code = ReadCode();
|
unsigned Code = ReadCode();
|
||||||
if (Code == bitc::END_BLOCK) {
|
if (Code == bitc::END_BLOCK) {
|
||||||
@@ -301,7 +301,7 @@ public:
|
|||||||
|
|
||||||
/// Reset the stream to the specified bit number.
|
/// Reset the stream to the specified bit number.
|
||||||
void JumpToBit(uint64_t BitNo) {
|
void JumpToBit(uint64_t BitNo) {
|
||||||
uintptr_t ByteNo = uintptr_t(BitNo/8) & ~(sizeof(word_t)-1);
|
size_t ByteNo = size_t(BitNo/8) & ~(sizeof(word_t)-1);
|
||||||
unsigned WordBitNo = unsigned(BitNo & (sizeof(word_t)*8-1));
|
unsigned WordBitNo = unsigned(BitNo & (sizeof(word_t)*8-1));
|
||||||
assert(canSkipToPos(ByteNo) && "Invalid location");
|
assert(canSkipToPos(ByteNo) && "Invalid location");
|
||||||
|
|
||||||
@@ -315,7 +315,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void fillCurWord() {
|
void fillCurWord() {
|
||||||
if (Size != 0 && NextChar >= (unsigned)Size)
|
if (Size != 0 && NextChar >= Size)
|
||||||
report_fatal_error("Unexpected end of file");
|
report_fatal_error("Unexpected end of file");
|
||||||
|
|
||||||
// Read the next word from the stream.
|
// Read the next word from the stream.
|
||||||
|
@@ -253,7 +253,7 @@ void BitstreamCursor::ReadAbbrevRecord() {
|
|||||||
|
|
||||||
BitCodeAbbrevOp::Encoding E = (BitCodeAbbrevOp::Encoding)Read(3);
|
BitCodeAbbrevOp::Encoding E = (BitCodeAbbrevOp::Encoding)Read(3);
|
||||||
if (BitCodeAbbrevOp::hasEncodingData(E)) {
|
if (BitCodeAbbrevOp::hasEncodingData(E)) {
|
||||||
unsigned Data = ReadVBR64(5);
|
uint64_t Data = ReadVBR64(5);
|
||||||
|
|
||||||
// As a special case, handle fixed(0) (i.e., a fixed field with zero bits)
|
// As a special case, handle fixed(0) (i.e., a fixed field with zero bits)
|
||||||
// and vbr(0) as a literal zero. This is decoded the same way, and avoids
|
// and vbr(0) as a literal zero. This is decoded the same way, and avoids
|
||||||
|
Reference in New Issue
Block a user