summaryrefslogtreecommitdiffstats
path: root/include/llvm/Bitcode
diff options
context:
space:
mode:
authorJeff Cohen <jeffc@jolt-lang.org>2007-05-06 03:12:47 +0000
committerJeff Cohen <jeffc@jolt-lang.org>2007-05-06 03:12:47 +0000
commit332376bc601fcff8d8a4558c2834ddd0189c12d1 (patch)
treeb960d5f612a99a404a2748255464516acb3f9687 /include/llvm/Bitcode
parentb330e38f4ab1096403ade60028456cae9d0c67f3 (diff)
downloadexternal_llvm-332376bc601fcff8d8a4558c2834ddd0189c12d1.zip
external_llvm-332376bc601fcff8d8a4558c2834ddd0189c12d1.tar.gz
external_llvm-332376bc601fcff8d8a4558c2834ddd0189c12d1.tar.bz2
Unbreak VC++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36831 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Bitcode')
-rw-r--r--include/llvm/Bitcode/BitCodes.h2
-rw-r--r--include/llvm/Bitcode/BitstreamReader.h12
-rw-r--r--include/llvm/Bitcode/BitstreamWriter.h4
3 files changed, 10 insertions, 8 deletions
diff --git a/include/llvm/Bitcode/BitCodes.h b/include/llvm/Bitcode/BitCodes.h
index 1d3087c..59d57e7 100644
--- a/include/llvm/Bitcode/BitCodes.h
+++ b/include/llvm/Bitcode/BitCodes.h
@@ -136,6 +136,7 @@ public:
if (C == '.') return 62;
if (C == '_') return 63;
assert(0 && "Not a value Char6 character!");
+ return 0;
}
static char DecodeChar6(unsigned V) {
@@ -146,6 +147,7 @@ public:
if (V == 62) return '.';
if (V == 63) return '_';
assert(0 && "Not a value Char6 character!");
+ return ' ';
}
};
diff --git a/include/llvm/Bitcode/BitstreamReader.h b/include/llvm/Bitcode/BitstreamReader.h
index e34dd09..6e855b9 100644
--- a/include/llvm/Bitcode/BitstreamReader.h
+++ b/include/llvm/Bitcode/BitstreamReader.h
@@ -110,8 +110,8 @@ public:
/// JumpToBit - Reset the stream to the specified bit number.
void JumpToBit(uint64_t BitNo) {
- unsigned ByteNo = (BitNo/8) & ~3;
- unsigned WordBitNo = BitNo & 31;
+ unsigned ByteNo = unsigned(BitNo/8) & ~3;
+ unsigned WordBitNo = unsigned(BitNo) & 31;
assert(ByteNo < (unsigned)(LastChar-FirstChar) && "Invalid location");
// Move the cursor to the right word.
@@ -327,10 +327,10 @@ private:
switch (Op.getEncoding()) {
default: assert(0 && "Unknown encoding!");
case BitCodeAbbrevOp::Fixed:
- Vals.push_back(Read(Op.getEncodingData()));
+ Vals.push_back(Read((unsigned)Op.getEncodingData()));
break;
case BitCodeAbbrevOp::VBR:
- Vals.push_back(ReadVBR64(Op.getEncodingData()));
+ Vals.push_back(ReadVBR64((unsigned)Op.getEncodingData()));
break;
case BitCodeAbbrevOp::Char6:
Vals.push_back(BitCodeAbbrevOp::DecodeChar6(Read(6)));
@@ -370,7 +370,7 @@ public:
}
}
- unsigned Code = Vals[0];
+ unsigned Code = (unsigned)Vals[0];
Vals.erase(Vals.begin());
return Code;
}
@@ -451,7 +451,7 @@ public:
default: break; // Default behavior, ignore unknown content.
case bitc::BLOCKINFO_CODE_SETBID:
if (Record.size() < 1) return true;
- CurBlockInfo = &getOrCreateBlockInfo(Record[0]);
+ CurBlockInfo = &getOrCreateBlockInfo((unsigned)Record[0]);
break;
}
}
diff --git a/include/llvm/Bitcode/BitstreamWriter.h b/include/llvm/Bitcode/BitstreamWriter.h
index 70c7bf8..20bcc1c 100644
--- a/include/llvm/Bitcode/BitstreamWriter.h
+++ b/include/llvm/Bitcode/BitstreamWriter.h
@@ -255,10 +255,10 @@ private:
switch (Op.getEncoding()) {
default: assert(0 && "Unknown encoding!");
case BitCodeAbbrevOp::Fixed:
- Emit(V, Op.getEncodingData());
+ Emit((unsigned)V, (unsigned)Op.getEncodingData());
break;
case BitCodeAbbrevOp::VBR:
- EmitVBR64(V, Op.getEncodingData());
+ EmitVBR64(V, (unsigned)Op.getEncodingData());
break;
case BitCodeAbbrevOp::Char6:
Emit(BitCodeAbbrevOp::EncodeChar6((char)V), 6);