[llvm-commits] [bug_122] CVS: llvm/lib/Target/CBackend/Writer.cpp

LLVM llvm at cs.uiuc.edu
Wed May 12 11:33:21 PDT 2004


Changes in directory llvm/lib/Target/CBackend:

Writer.cpp updated: 1.174 -> 1.174.2.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:  (+4 -4)

Index: llvm/lib/Target/CBackend/Writer.cpp
diff -u llvm/lib/Target/CBackend/Writer.cpp:1.174 llvm/lib/Target/CBackend/Writer.cpp:1.174.2.1
--- llvm/lib/Target/CBackend/Writer.cpp:1.174	Sun May  9 15:41:32 2004
+++ llvm/lib/Target/CBackend/Writer.cpp	Wed May 12 11:33:43 2004
@@ -216,9 +216,9 @@
   //
   SymbolTable &MST = M.getSymbolTable();
   if (MST.find(Type::TypeTy) != MST.end())
-    for (SymbolTable::type_iterator I = MST.type_begin(Type::TypeTy),
+    for (SymbolTable::value_iterator I = MST.type_begin(Type::TypeTy),
            E = MST.type_end(Type::TypeTy); I != E; ) {
-      SymbolTable::type_iterator It = I++;
+      SymbolTable::value_iterator It = I++;
       if (StructType *STy = dyn_cast<StructType>(It->second)) {
         // If this is not used, remove it from the symbol table.
         std::set<const Type *>::iterator UTI = UT.find(STy);
@@ -865,8 +865,8 @@
     return;
 
   // We are only interested in the type plane of the symbol table...
-  SymbolTable::type_const_iterator I   = ST.type_begin(Type::TypeTy);
-  SymbolTable::type_const_iterator End = ST.type_end(Type::TypeTy);
+  SymbolTable::value_const_iterator I   = ST.type_begin(Type::TypeTy);
+  SymbolTable::value_const_iterator End = ST.type_end(Type::TypeTy);
   
   // Print out forward declarations for structure types before anything else!
   Out << "/* Structure forward decls */\n";





More information about the llvm-commits mailing list