[llvm-commits] [bug_122] CVS: llvm/lib/Bytecode/Writer/Writer.cpp WriterInternals.h
LLVM
llvm at cs.uiuc.edu
Wed May 12 11:34:04 PDT 2004
Changes in directory llvm/lib/Bytecode/Writer:
Writer.cpp updated: 1.62 -> 1.62.2.1
WriterInternals.h updated: 1.20 -> 1.20.6.1
---
Log message:
Change SymbolTable to not subclass from std::map but to embed one instead
and cleanup use of SymbolTable in rest of LLVM. Also, add some new methods
to SymbolTable for small/utility cases and substitute calls to them in
LLVM.
---
Diffs of the changes: (+11 -3)
Index: llvm/lib/Bytecode/Writer/Writer.cpp
diff -u llvm/lib/Bytecode/Writer/Writer.cpp:1.62 llvm/lib/Bytecode/Writer/Writer.cpp:1.62.2.1
--- llvm/lib/Bytecode/Writer/Writer.cpp:1.62 Sun Apr 4 20:27:26 2004
+++ llvm/lib/Bytecode/Writer/Writer.cpp Wed May 12 11:33:43 2004
@@ -312,9 +312,9 @@
BytecodeBlock SymTabBlock(BytecodeFormat::SymbolTable, Out,
true/* ElideIfEmpty*/);
- for (SymbolTable::const_iterator TI = MST.begin(); TI != MST.end(); ++TI) {
- SymbolTable::type_const_iterator I = MST.type_begin(TI->first);
- SymbolTable::type_const_iterator End = MST.type_end(TI->first);
+ for (SymbolTable::type_const_iterator TI = MST.begin(); TI != MST.end(); ++TI) {
+ SymbolTable::value_const_iterator I = MST.type_begin(TI->first);
+ SymbolTable::value_const_iterator End = MST.type_end(TI->first);
int Slot;
if (I == End) continue; // Don't mess with an absent type...
Index: llvm/lib/Bytecode/Writer/WriterInternals.h
diff -u llvm/lib/Bytecode/Writer/WriterInternals.h:1.20 llvm/lib/Bytecode/Writer/WriterInternals.h:1.20.6.1
--- llvm/lib/Bytecode/Writer/WriterInternals.h:1.20 Tue Jan 20 13:50:34 2004
+++ llvm/lib/Bytecode/Writer/WriterInternals.h Wed May 12 11:33:43 2004
@@ -50,6 +50,14 @@
unsigned StartNo);
void outputConstant(const Constant *CPV);
void outputType(const Type *T);
+
+ struct OutputSymbolTableFunctor {
+ const SymbolTable* MST;
+ BytecodeWriter* bw;
+ int Slot;
+ const Type* LastType;
+ void operator() ( const Type* Ty, const std::string& Name, const Value* V );
+ };
};
More information about the llvm-commits
mailing list