summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bytecode/Writer
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-06-25 00:35:55 +0000
committerChris Lattner <sabre@nondot.org>2004-06-25 00:35:55 +0000
commitccd8ed145a0c0ca9e1d1afeaaecc1b603a1ccf51 (patch)
tree4aee2684d4af866756af979d8a21e90e5f1be9e9 /llvm/lib/Bytecode/Writer
parent6b9598db89ac8959d89930876b770e088ef0e9b7 (diff)
downloadbcm5719-llvm-ccd8ed145a0c0ca9e1d1afeaaecc1b603a1ccf51.tar.gz
bcm5719-llvm-ccd8ed145a0c0ca9e1d1afeaaecc1b603a1ccf51.zip
Fix more warnings building with VC++
llvm-svn: 14391
Diffstat (limited to 'llvm/lib/Bytecode/Writer')
-rw-r--r--llvm/lib/Bytecode/Writer/SlotCalculator.cpp3
-rw-r--r--llvm/lib/Bytecode/Writer/Writer.cpp4
2 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Bytecode/Writer/SlotCalculator.cpp b/llvm/lib/Bytecode/Writer/SlotCalculator.cpp
index 97d336e2db2..94791e37b1c 100644
--- a/llvm/lib/Bytecode/Writer/SlotCalculator.cpp
+++ b/llvm/lib/Bytecode/Writer/SlotCalculator.cpp
@@ -717,7 +717,8 @@ int SlotCalculator::insertValue(const Value *D, bool dontIgnore) {
// If we haven't seen this sub type before, add it to our type table!
if (getSlot(SubTy) == -1) {
SC_DEBUG(" Inserting subtype: " << SubTy->getDescription() << "\n");
- int Slot = doInsertValue(SubTy);
+ SC_DEBUG(int Slot = );
+ doInsertValue(SubTy);
SC_DEBUG(" Inserted subtype: " << SubTy->getDescription() <<
" slot=" << Slot << "\n");
}
diff --git a/llvm/lib/Bytecode/Writer/Writer.cpp b/llvm/lib/Bytecode/Writer/Writer.cpp
index 5b6fdd79004..3a17508e924 100644
--- a/llvm/lib/Bytecode/Writer/Writer.cpp
+++ b/llvm/lib/Bytecode/Writer/Writer.cpp
@@ -340,8 +340,6 @@ void BytecodeWriter::outputSymbolTable(const SymbolTable &MST) {
for (; I != End; ++I) {
// Symtab entry: [def slot #][name]
- const Value *V = I->second;
-
Slot = Table.getSlot(I->second);
assert(Slot != -1 && "Value in symtab but has no slot number!!");
output_vbr((unsigned)Slot, Out);
@@ -380,7 +378,7 @@ void llvm::WriteBytecodeToFile(const Module *C, std::ostream &Out) {
}
// Write out the chunk...
- Out.write((char*)ChunkPtr, LastPtr-ChunkPtr);
+ Out.write((char*)ChunkPtr, unsigned(LastPtr-ChunkPtr));
}
Out.flush();
OpenPOWER on IntegriCloud