Unbreak VC++.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36831 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jeff Cohen 2007-05-06 03:12:47 +00:00
parent b330e38f4a
commit 332376bc60
6 changed files with 15 additions and 9 deletions

View File

@ -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 ' ';
}
};

View File

@ -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;
}
}

View File

@ -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);

View File

@ -808,7 +808,7 @@ static void WriteInstruction(const Instruction &I, unsigned InstID,
case Instruction::Call: {
Code = bitc::FUNC_CODE_INST_CALL;
Vals.push_back((cast<CallInst>(I).getCallingConv() << 1) |
cast<CallInst>(I).isTailCall());
unsigned(cast<CallInst>(I).isTailCall()));
PushValueAndType(I.getOperand(0), InstID, Vals, VE); // Callee
// Emit value #'s for the fixed parameters.

View File

@ -108,6 +108,9 @@
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
<File
RelativePath="..\..\lib\Bitcode\Writer\BitcodeWriterPass.cpp">
</File>
<Filter
Name="Reader"
Filter="">

View File

@ -175,6 +175,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "opt", "opt\opt.vcproj", "{0
{28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508}
{19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E}
{F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}
{F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}
{059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} = {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4}
{C59374C1-9FC0-4147-B836-327DFDC52D99} = {C59374C1-9FC0-4147-B836-327DFDC52D99}
{45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB}