[llvm-commits] CVS: llvm/lib/Bytecode/Writer/Writer.cpp
Reid Spencer
reid at x10sys.com
Mon Aug 16 19:59:13 PDT 2004
Changes in directory llvm/lib/Bytecode/Writer:
Writer.cpp updated: 1.73 -> 1.74
---
Log message:
Correct the comments in the symbol table writer to reflect reality.
---
Diffs of the changes: (+7 -3)
Index: llvm/lib/Bytecode/Writer/Writer.cpp
diff -u llvm/lib/Bytecode/Writer/Writer.cpp:1.73 llvm/lib/Bytecode/Writer/Writer.cpp:1.74
--- llvm/lib/Bytecode/Writer/Writer.cpp:1.73 Wed Aug 4 03:33:20 2004
+++ llvm/lib/Bytecode/Writer/Writer.cpp Mon Aug 16 21:59:02 2004
@@ -1041,11 +1041,13 @@
BytecodeBlock SymTabBlock(BytecodeFormat::SymbolTableBlockID, *this,
true/* ElideIfEmpty*/);
- //Symtab block header for types: [num entries]
+ // Write the number of types
output_vbr(MST.num_types());
+
+ // Write each of the types
for (SymbolTable::type_const_iterator TI = MST.type_begin(),
TE = MST.type_end(); TI != TE; ++TI ) {
- //Symtab entry:[def slot #][name]
+ // Symtab entry:[def slot #][name]
output_typeid((unsigned)Table.getSlot(TI->second));
output(TI->first, /*align=*/false);
}
@@ -1059,13 +1061,15 @@
if (I == End) continue; // Don't mess with an absent type...
- // Symtab block header: [num entries][type id number]
+ // Write the number of values in this plane
output_vbr(MST.type_size(PI->first));
+ // Write the slot number of the type for this plane
Slot = Table.getSlot(PI->first);
assert(Slot != -1 && "Type in symtab, but not in table!");
output_typeid((unsigned)Slot);
+ // Write each of the values in this plane
for (; I != End; ++I) {
// Symtab entry: [def slot #][name]
Slot = Table.getSlot(I->second);
More information about the llvm-commits
mailing list