summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bytecode/Writer
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-08-17 02:59:02 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-08-17 02:59:02 +0000
commitf8a18099fb0d16e37180a4b5aa05d056ffd1f41e (patch)
tree104ae563271bfb63ad235cb37d336ee41fd55444 /llvm/lib/Bytecode/Writer
parenta8fbbc0ec38c643781806bcadae48622b894d3f7 (diff)
downloadbcm5719-llvm-f8a18099fb0d16e37180a4b5aa05d056ffd1f41e.tar.gz
bcm5719-llvm-f8a18099fb0d16e37180a4b5aa05d056ffd1f41e.zip
Correct the comments in the symbol table writer to reflect reality.
llvm-svn: 15848
Diffstat (limited to 'llvm/lib/Bytecode/Writer')
-rw-r--r--llvm/lib/Bytecode/Writer/Writer.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/Bytecode/Writer/Writer.cpp b/llvm/lib/Bytecode/Writer/Writer.cpp
index 579041991b9..906835b0959 100644
--- a/llvm/lib/Bytecode/Writer/Writer.cpp
+++ b/llvm/lib/Bytecode/Writer/Writer.cpp
@@ -1041,11 +1041,13 @@ void BytecodeWriter::outputSymbolTable(const SymbolTable &MST) {
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 @@ void BytecodeWriter::outputSymbolTable(const SymbolTable &MST) {
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);
OpenPOWER on IntegriCloud